*****************************************************************
* Custom	Scripts.dll For C&C Renegade			*
* Author:	Jonathan Wilson					*
* Website:	http://www.sourceforge.net/projects/rentools	*
* Email:	jonwil@tpgi.com.au				*
* ICQ:		77572965					*
* AIM:		jonwil2002					*
* Yahoo:	jonwil2002					*
* MSN:		JonathanWilson623@hotmail.com			*
*****************************************************************

This DLL has been tested with the FDS and works so far, any issues let me know. As of 1.5, it should work with both the RH 7 and RH8 versions of the Linux FDS. (thanks datalore)
It has been tested with Load + Save and works just fine.
I really need to get as many people as possible testing this dll, using it in maps and so on.
If you have any ideas for new scripts please contact me, Jonathan Wilson.
Also contact me if you have any questions, want to report bugs and so on.
Should you experience a crash in renegade with my dll installed, look for a file called critical.txt
Should critical.txt exist (it will say "Critical Scripts.dll error" in it) let me know (I need to know what the parameter specified in the critical.txt line is)
Also, when reporting crashes, _except.txt contains important details of the crash so hang on to it.
If you get the "bhs.dll not found" or "Scripts2.dll not found" message, look for dllload.txt, that will contain error info I can use to diagnose why bhs.dll/scripts2.dll isnt loading.
I do not provide support for any of the Black-Cell mods (Dragonade, SSAOW, SSCTF etc) so do not ask me about them (e.g. "how did Black-Cell do xxx" or "how can I get xxx Black-Cell mod to work").
If you want support for Black-Cell mods, talk to Black-Cell.
The scripts.dll/bhs.dll should not be used with anything released by Silent_Kane except for the stuff included with RenAlert.

Thanks to all the people who have coded scripts in the custom scripts.dll and helped with the C++ stuff.
Thanks to Datalore for his work on the LFDS stuff (and to mac for testing it and stuff)
Thanks to Mac for getting me Linux FDS boxes to test the scripts.dll on.
Thanks to TheKGBSpy, NeoSaber, vloktboky03 and others (who I forget) who have made discoveries about the engine and the scripts.dll.
And thanks to all the people who have tested, provided ideas and so on. (far too many to list)
Also, a big thanks also to Greg Hjelstrom & all the people at Westwood Studios for being so helpfull in answering all those questions about the game engine over on the message boards
and also for writing such a great game in the first place.

No thanks to the PHB managers at EA for forcing me to do all the 
reverse engineering on this myself instead of being able to use the real scripts.dll from westwood.

Below is a quick guide to using the custom Scripts.dll

This is a guide on how to use the Scripts.dll from Jonathan Wilson.

Installation:
Go to your *\Westwood\Renegade\ Directory, and rename the scripts.dll to scripts2.dll
Unzip Scripts.dll into your *\Westwood\Renegade\ Directory.

Now the scripts will work normally in game, these are just EXPANDED scripts.
Use:
Startup Commando Level Editory (RenEditor), Create a new Mod.
Now after the folders have been created (RenEditor loads up), go ahead and close it.
Now Create a new directory inside your new mod folder called "Scripts"
Next Copy Scripts.dll AND Scripts2.dll into this new directory.
Your new scripts will now be available in game.

New Scripts:
You will add these new scripts exactly like you did before.
you may want to bookmark this site ("http://www.celticrover.com/tig/hex.asp") for the hex to decimal conversions
If you need to know the string IDs, download strdump from the same place you got this file and run it on your strings.tdb, its a console app and will print details of the strings to the console screen.

JFW_Spawn_Object_Death (This script will create an object upon death of a unit, does not work on player spawners)
	Drop_Object (Preset STRING Name) example POW_Flamethrower_Player
	Drop_Height (Z "modifier") example 2.0 (This is to adjust the height for the dropped object, usually only used for vehicles). 
	A good default for weapons, keycards etc is 0.25 (the figure is in meters)
	Note that the spawned object will be facing the same way as the object that died

JFW_Poke_Send_Custom (This script will send a message to an object when its poked. It also uses script commands to make the little green arrows appear when its at state 0 or 1.)
	The script triggers on startup, sent a message and ActionKey (aka poke). On startup, it sets the state to 0, unless the Activate_Message is 0 then it sets it to 1.
	When its sent the message that matches the Activate_Message paramater, it sets the state to the message param.
	When the action key is pressed, if the state is 0, it will play a sound (something like "access deined" or something).
	If the state is 1, it will send the message and paramater specified to the object specified. If the state is 2, it will do nothing.
	Sound_Name (the sound to play when it triggers if the state is 0, it will actually play now since I figured it out, must be 3D)
	Activate_Message (The number of a message that, when sent to this object, changes the state)
	Object_Id (The object ID to send the message to when its poked)
	Message (The message to send when its poked)
	Param (The paramater to pass when its poked)
	Delay (how long to wait before sending the custom)

JFW_Custom_Destroy_Object (This script will destroy an object when a message is sent to it)
	Message (The message to check for)
	ID (The ID of the object to destroy)

JFW_Custom_Toggle_Radar (This script will toggle the radar when it recives the message specified)
	Message (The message to check for, send a paramater of 1 to disable radar and 0 to enable radar)

JFW_Attatch_Script (this script will attatch another script to an object, depending on the paramaters passed in)
	Trigger (what event to trigger the script on, 1 = zone entry, 2 = object death, 3 = custom, 4 = poke)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc, doesnt apply for trigger type of 2 or 3)
	Script_Name (what script to attatch)
	Script_Params (paramaters to pass to that script, its basicly a list like you see in leveledit next to the script name)
	Delim (since the string for Script_Params cant contain any commas, this field specifies what char is to be used instead, the script replaces it with a comma before attatching)
	Destroy (this specifies whether to destroy the object after the script is attatched, applies for trigger type 1 and 4, 1 = destroy else it doesnt destroy)
	Custom (the message to test for when there is a trigger type of 3)

JFW_Reflect_Message (this script will send any message it recieves back to whatever object sent it)
	It takes no paramaters

JFW_Add_Objective (this script adds an objective, make sure its called before the other objective scripts)
	Objective_Num (This is an identifier for the objective, generally it would be a good idea to keep them in order,and start with 1000)
	Objective_Type (Type of objective, takes three different numbers; 1=Primary Objective, 2=Secondary, 3=Hidden)
	Title_ID (Title ID of the objective, this is a numeric value that links to a string in Stings.tdb, you can use 4607 for testing)
	Unknown (this is an unknown value, could be another string ID)
	Sound_Name (I think its a sound, cant be sure. Dont know if its 2D or 3D or when its played.)
	Description_ID (Another String For the Objective, but this is the one that is used to display the objective to the player, like Objective Title ID, you can test with 4607, its kind of like a description of the objective)
	Trigger (see below for note about trigger and usage)

JFW_Remove_Objective (this script removes an objective)
	Objective_Num (the objective number to remove)

JFW_Set_Objective_Status (this script sets the status of an objective)
	Objective_Num (The number of the objective you would like to set the status of)
	Status (the new status,1=Success, 2=Failed)

JFW_Change_Objective_Type (this script changes the type of an objective)
	Objective_Num (The number of the objective you would like to change the type of)
	Objective_Type (Type of objective, takes three different numbers; 1=Primary Objective, 2=Secondary, 3=Hidden)

JFW_Set_Objective_Radar_Blip (this sets the "star" icon on the radar for the objective to a vector)
	Objective_Num (The number of the objective you would like to set the radar blip for)
	Position (This is an x,y,z indicating the location of the objective)

JFW_Set_Objective_Radar_Blip_Object (this sets the "star" icon on the radar for the objective to an object)
	Objective_Num (The number of the objective you would like to set the radar blip for)
	Object (The numeric ID of the object as seen in leveledit)

JFW_Set_Objective_HUD_Info (This shows the little "pog" picture for the objective)
	Objective_Num (The number of the objective you would like to show the pog for)	
	Priority (the priority of the objective, not sure quite how this works)
	Pog_File_Name (This is the *.tga filename of your objective pogs, you can search Always.dat with XCC and enter in the search string *pog* to find some to use, you could use "POG_M05_1_01.tga" for test)
	Pog_Title_Id (This is the test that will show up on the POG in the game (i.e. ACCESS, DESTROY), you can find these in String.tdb, you can use 7372(which is ACCESS) for testing)

JFW_Set_Objective_HUD_Info_Position (This shows the little "pog" picture for the objective and enables the "range and direction finder" arrow)
	Objective_Num (The number of the objective you would like to show the pog for)	
	Priority (the priority of the objective, not sure quite how this works)
	Pog_File_Name (This is the *.tga filename of your objective pogs, you can search Always.dat with XCC and enter in the search string *pog* to find some to use, you could use "POG_M05_1_01.tga" for test)
	Pog_Title_Id (This is the test that will show up on the POG in the game (i.e. ACCESS, DESTROY), you can find these in String.tdb, you can use 7372(which is ACCESS) for testing)
	Position (This is an x,y,z indicating the location of the objective)

JFW_Set_Num_Tertary_Objectives (This specifies the number of tertary aka hidden objectives, dont know why its there, it just is)
	Count (count of tertary objectives)

JFW_Mission_Complete (This completes the mission)
	Won (0 = mission failed, 1 = mission suceeded)

Note about trigger paramater for JFW_Add_Objective. Because of how renegade works, you have to make sure that the Set_Objective_Radar_Blip and Set_Objective_HUD_Info scripts get executed after the Add_Objective script.
Unless you have an object that you want to attatch both a HUD script and/or Radar script plus the Add_Objectve script to, you dont do anything special.
But, if you are attatching a HUD script or a Radar script to the same object as the Add_Objective script, you need to do special stuff.
What you do is you setup add_objective in the usual way. You set the "trigger" paramater to a message number.
Then, you add the HUD or Radar script, set the type to 3 and the typeval to the same thing as you set the "trigger" for the add_objective script
Then, you set the other paramaters of the HUD or Radar script as usual.

All the objective scripts listed above (plus the mission complete) take, in addition to the paramaters mentioned for the individual script, 2 paramaters:
	Type (what event to trigger the script on, 0 = startup, 1 = zone entry, 2 = object death, 3 = custom, 4 = poke, 5 = timer expired)
	TypeVal (what the script does with this depends on the type)
	If the type is 0, 2, 4 then the TypeVal is ignored. 
	If its 1, the TypeVal specifies what player type to activate on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc
	If its 3, the TypeVal specifies what message to trigger on
	If its 5, the TypeVal specifies what value of the "timer" paramater to trigger on.
	All the scripts also take a paramater called Timer_Custom. Because of the way timers work (they work on a script by script basis, they arent global), you need to set this to the same as the value for JFW_Start_Timer in order to make timers work.
	If type is not 5, it doesnt matter what this is set to.

JFW_Start_Timer (this script starts a timer)
	Type (what event to trigger the script on, 0 = startup, 1 = zone entry, 2 = object death, 3 = custom, 4 = poke)
	TypeVal (what the script does with this depends on the type, its the same as the objective scripts above)
	Timer_Object (what object to set the timer on, numeric object ID)
	Timer_Number (this is the number for the timer, its what you use for the "typeval" later on)
	Timer_Time (how long to set the timer for)
	Timer_Repeat (set to 1 to make the timer repeat indefinatly, set to 0 to make it only execute once)
	Timer_Custom. (This one must match with the Timer_Custom value for one or more scripts attatched to the Timer_Object)

JFW_Preset_Buy (this script is supposed to act as a "purchase point" for e.g. a helipad, it triggers on zone entry)
	Preset_Name (the name of the preset to create)
	Cost (the cost)
	Location (the location to spawn it at)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc)
Note that if the player doesnt have enough cash, no purchase will take place

JFW_Death_Send_Custom (this script sends a message when whatever its attatched to dies, use with JFW_Custom_Destroy_Object to destroy 1 object when another object dies)
	ID (the ID of the object to send the message to)
	Message (the message to send)
	Param (the paramater to pass)

JFW_Pokeable_Item (This script will turn on the 3 green poke arrows for an object)

JFW_Death_Play_Cinematic (This script will fire off a cinematic when the object its attatched to dies)
	Script_Name (the name of the *.txt script to fire)
	Location (the location to fire it off at)
	Facing (what direction to fire it off in)

JFW_Zone_Play_Cinematic (This script will fire off a cinematic when the zone its attatched to is entered)
	Script_Name (the name of the *.txt script to fire)
	Location (the location to fire it off at)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc)
	Facing (what direction to fire it off in)

JFW_Blow_Up_On_Enter (This script will create an explosion at the location of the object that entered the zone)
	Explosion (the explosion to create)

JFW_Apply_Damage_On_Enter (This script will apply damage to the object that entered the zone)
	Warhead (the warhead to use)
	Damage (how much damage to do)

JFW_Team_DM_Zone (This script is the zone script for the team deathmatch. Place enough of these zones such that every startup spawner is contained entirely within a zone)
	Player_Type (the player type to trigger on, 0 = Nod, 1 = GDI)
	Controller_ID (the ID of the team DM controller for the team)
	Deactivate_Message (the message that is used to make sure that a player can only have one copy of the Attatched script active at once)
	Death_Message (the message that is sent to the controller to record a death for that team)
	
JFW_Team_DM_Attatched (This script gets attatched to the player object when it walks out of the zone after it spawns, dont use this script directly)
	Controller_ID (the ID of the team DM controller for the team)
	Deactivate_Message (the message that is used to make sure that a player can only have one copy of the Attatched script active at once)
	Death_Message (the message that is sent to the controller to record a death for that team)

JFW_Team_DM_Controller (This script should be attatched to a DavesArrow or something, one for each team)
	Deaths_To_Loose (how many deaths must happen before the game is over)
	Death_Message (the message that is sent to the controller to record a death for that team)
	Building_To_Destroy1 (the first building to destroy when the game is over)
	Building_To_Destroy2 (the second building to destroy when the game is over)
	Building_To_Destroy3 (the third uilding to destroy when the game is over)
	Building_To_Destroy4 (the forth building to destroy when the game is over)
	Building_To_Destroy5 (the fifth building to destroy when the game is over)
	Note that PCTs and Team DM dont mix, dont use them. No vechicles either.

JFW_Timer_Destroy_Building (destroys a building when the timer expires)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)

JFW_Custom_Destroy_Building (destroys a building when it recieves a message)
	Message (the message to look for)
	ID (the ID of the object to destroy)

JFW_Zone_PCT (triggers a PCT on zone entry)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = trigger GDI terminal for GDI players, Nod terminal for Nod players)
	Thanks to bhs.dll, this script now works.

JFW_2D_Sound_Timer (plays a 2D sound when the timer expires)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (whether to repeat this or to only send it once, 1 = repeat, 0 = not repeat)
	Sound (the sound preset to use, must be 2D)

JFW_3D_Sound_Zone (plays a 3D sound on entry to the zone)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Sound (the sound preset to use, must be 3D)

JFW_Timer_Play_Cinematic (plays a cinematic when a timer runs out)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)	
	Repeat (whether to repeat this or to only play it once, 1 = repeat, 0 = not repeat)
	Script_Name (the name of the *.txt script to fire)
	Location (the location to fire it off at)
	Facing (what direction to fire it off in)

JFW_User_Settable_Parameters (reads parameters for a script from a file, store them like you would see them in LevelEdit script list window)
	File_Name (what filename to read the parameters from, it will read from the path where game.exe is, if you put say data\params.txt it will read params.txt from renegade data folder)
	Script_Name (the script name to attatch)

JFW_Nod_Turret (this script is a clone of M00_Nod_Turret)
	no parameters

JFW_Base_Defence (this script is a clone of M00_Base_Defence)
	MinAttackDistance (minumum attack distance)
	MaxAttackDistance (maximum attack distance)
	AttackTimer (time between attacks)
Note that this script has had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_User_Controllable_Base_Defence (this script is a clone of GTH_User_Controllable_Base_Defence)
	MinAttackDistance (minumum attack distance)
	MaxAttackDistance (maximum attack distance)
	AttackTimer (time between attacks)
Note that this script has had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Bounce_Zone_Entry (this script adds a fixed value to the Z position of anything that enters the zone)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Amount (what to add to the z position each time)

JFW_Grant_Key_Zone_Entry (this grants a key on zone entry)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Key (what key number to grant)

JFW_Custom_Play_Cinematic (this script plays a cinematic when it recieves a custom)
	Message (what message will start the cinematic playing)
	Script_Name (the name of the *.txt script to fire)
	Location (the location to fire it off at)
	Facing (what direction to fire it off in)

JFW_Debug_Text_File (this script logs all events that happen to an object to a text file)
	Log_File (the filename to use, only one copy of the script can reference a given log file)
	Description (a description of the object to place in the logs)
	Note that because of how renegade works, it probobly wont log ActionComplete or TimerExpired events. Anything else should be logged though.

JFW_Timer_Custom (sends a custom when a timer expires)
	Time (the time to go for)
	TimerNum (the timer number to use)
	Repeat (whether to repeat this or to only send it once, 1 = repeat, 0 = not repeat)
	ID (what ID to send the message to)
	Message (what message to send)
	Param (what parameter to send)

JFW_Blow_Up_On_Death (this script creates an explosion when whatever its attatched to dies, usefull for e.g. a Demo Truck)
	Explosion (which explosion to create)
Thanks to bhs.dll, the explosion will now work even if the client doesnt have BHS.DLL installed
And no damage is done to buildings, use JFW_Death_Send_Custom (or some relation of it like JFW_Death_Send_Custom_Driver_ID in you want to have points be given for the driver of the vechicle) and JFW_Building_Damage_Controler for that bit.
And to make the driver die, use RA_DriverDeath

JFW_Zone_Send_Custom_Enable (sends a custom when a zone is entered or exited but only if its enabled)
	ID (the id to send the messages to)
	EnterMessage (message to send on entry)
	EnterParam (param to send on entry)
	ExitMessage (message to send on exit)
	ExitParam (param to send on exit)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Enable_Message (what message will turn the zone on)
	Disable_Message (what message will turn the zone off)

JFW_Zone_Send_Custom_Preset (sends a custom when a zone is entered or exited but only if the object that entered it is a specific preset)
	ID (the id to send the messages to)
	EnterMessage (message to send on entry)
	EnterParam (param to send on entry)
	ExitMessage (message to send on exit)
	ExitParam (param to send on exit)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Preset_Name (what preset name to trigger on)

JFW_2D_Sound_Timer_Random (plays a sound at random intervals)
	Time_Min (minumum time for how long the timer should run for)
	Time_Max (maximum time for how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (whether to repeat this or to only send it once, 1 = repeat, 0 = not repeat)
	Sound (the sound preset to use, must be 2D)

JFW_3D_Sound_Timer_Random (plays a sound at random intervals)
	Time_Min (minumum time for how long the timer should run for)
	Time_Max (maximum time for how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (whether to repeat this or to only send it once, 1 = repeat, 0 = not repeat)
	Sound (the sound preset to use, must be 3D)
	Position (the position to play the sound at)

JFW_2D_Sound_Timer_Health (plays a 2D sound when the timer expires but only if the health of the object its attatched to is between certain values, great for "building is damaged" for example)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (whether to repeat this or to only send it once, 1 = repeat, 0 = not repeat)
	Sound (the sound preset to use, must be 2D)
	Min_Health (minumum health can be for the sound to play)
	Max_Health (maximum health can be for the sound to play)

JFW_Aircraft_Fuel (makes a vecicle only usable for a limited time, time starts when you enter the vecicle for the first time)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	Explosion (what explosion to create when the time runs out)
	Refuel_Message (what message will reset the timer, perhans sent by a zone somewhere or something)

JFW_Power_Off (powers off a building or powers it on, only base defence structures actually stop working)
	Message_Off (what message will turn the building off)
	Message_On (what message will turn the building on)

JFW_Assault_Powerplant_Controller (script for assault map)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)	
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Power_Off (what message will turn the buildings off)
	Power_On (what message will turn the buildings on)
	Building1-Building15 (the buildings to turn off/on)
	On startup, this script sets an internal flag to false then sends Power_Off to all 15 building controllers. It also starts a timer.
	On timer expired, if the flag is false it will send Power_On to all 15 buildings.
	On zone entry, the flag is set to true.
	On zone exit, the flag is set to false.

JFW_Nod_Obelisk_CnC (this script is a clone of M00_Nod_Obelisk_CnC)
	Controller_ID (this is for if u have more than one obelisk)

JFW_Obelisk_Weapon_CnC (this script is a clone of M00_Obelisk_Weapon_CnC)
	no parameters

JFW_Advanced_Guard_Tower (this script is a clone of M00_Advanced_Guard_Tower)
	no parameters

JFW_Advanced_Guard_Tower_Missile (this script is a clone of M00_Advanced_Guard_Tower_Missile)
	no parameters

JFW_Advanced_Guard_Tower_Gun (this script is a clone of M00_Advanced_Guard_Tower_Gun)
	no parameters

JFW_Building_Gun (generic script for doing base defences)
	Disable_Custom (what custom to use internally to disable the building when the power goes out or when the building is destroyed)
	Positon (what offset from the building controller to spawn the weapon at)
	Weapon (what "vechicle" to use for the weapon, e.g. GDI_AGT is for the AGT missile)
	Visible (if the "vechicle" should be visible (like the AGT guns) or invisible (like the AGT missile), 0 = invisible, 1 = visible)
	Min_Range (if the thing its going to shoot at is closer than this range not counting any differences in Z position, it wont be shot at)
	Max_Range (if the thing its going to shoot at is further away than this range, it wont be shot at)

JFW_Building_Gun_Weapon (weapon script for JFW_Building_Gun, dont use this directly)
	Disable_Custom (what custom to use internally to disable the building when the power goes out or when the building is destroyed)
	Visible (if the "vechicle" should be visible (like the AGT guns) or invisible (like the AGT missile), 0 = invisible, 1 = visible)
	Min_Range (if the thing its going to shoot at is closer than this range not counting any differences in Z position, it wont be shot at)
	Max_Range (if the thing its going to shoot at is further away than this range, it wont be shot at)	
Tips when making this:
Make sure that the team of the gun is different from the team of the thing its shooting at, otherwise it wont work.
Also, the JFW_Building_Gun script is very sensitive to the sight range of the "gun" vechicle, make sure that the sight
range of the gun vechicle and the range of the weapon preset are all BIGGER than the max range set in the script.
If you still get problems after fiddling with all the settings, let me know and I can investigate further. Its not
the script though, I am now 100% sure of that.
Note that this script has had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Guard_Duty_Helper (helper script for JFW_Guard_Duty, dont attach this to anything)
	ID (the ID of the main vechicle object)
	Helper_Msg (what message to use for the helper communications)

JFW_Guard_Duty (script for vechicle AI)
	Helper_Obj (preset name of object should be used for the special helper object, see below)
	Helper_Bone (what bone to attach the helper object to, muzzle is good)
	Range (the range to use for the attack, should be the same as whatever range the vechicles weapon has)
	Dummy_Object (a dummy object to use when its not actually attacking something, it wont ever get shot at, just use anything u like)
	Helper_Msg (what message to use for the helper communications)
	Waypathid (the waypath to follow)
	Attack_Time (how many seconds to attack for before stopping the attack)
	Wait_Time (how many seconds to wait for after stopping the attack before it can attack again)

How to use JFW_Guard_Duty:
1.make a new vechicle preset (anywhere in the preset tree will do).
It needs the following settings:
Physics Model of DecorationPhys.
Model name of always\weapons\invisible\v_invs_turret.w3d (since thats invisible & wont get in the way)
No health or armour
Player Type being the same as the AI vechicle.
NotTargetable should be checked
RadarBlipType should be none
no Animation
no Killed Explosion
no Orator type
DefaultHybernationEnable, AllowInnateConversations & UseCreationEffect should be unchecked
weapon should be set to none
sight settings should be set to whatever you want for the vechicle (the ones on the vechicle itself will have no effect)
IsStealthUnit should be unchecked (even if the vechicle you are sticking it on is stealth)
TypeName, FireAnim and Profile should be empty
Aim2d should be off
Type should match whatever the thing you are attaching it to is.
SightDownMuzzle and OccupantsVisible should both be unchecked
NumSeats should be 0
All string ids should be 0
No transitions or scritps should be attatched to this object.
Note down its preset name, you will need it later.
Now place the waypath you want the AI vechicle to follow.
Place the AI vechicle next to the start of this Waypath.
Circular Waypaths work, dont know what will happen with ones that dont start & end near the same place.
Then attatch JFW_Guard_Duty to the object.
Set Helper_Obj to the preset name of the helper preset you made earlier
Set Helper_Bone to the name of a bone on the vechicle. This should be "visible" from as many different angles as possible.
On the Med Tank for example, the muzzle bone seemed to be the best.
Set Range to the same thing as the range of the vechicles weapon.
Set Dummy_Object to any object you like, it wont get fired at, it just has to be there to make the logic work.
Set Helper_Msg to anything you like that doesnt conflict with other messages being passed about, this is what gets used to pass messages between the helper object and the main object.
Set Waypathid to the ID of the waypath to follow
Fiddle with the values of attack_time and wait_time to see what values get the best results.

The vehicle itself should have DefaultHibernationEnable cleared.
Setting other settings for the vechicle helps also (depending on the vechicle).
Just play around with the settinds and it should work.

JFW_Hunt_Attack (script for vechicles/whatever that sit there until something comes within their sight range then it attacks them)
	Attack_Range (what range to use when attacking)

JFW_Hunt_Blow_Up (script for vechicles/whatever that sit there until something comes within their sight range then it chases them until it reaches them or they disappear. When it gets to them, it explodes)
	Speed (how fast to chase them)
	Distance (how close to get to the object before blowing up)
	Explosion (what explosion to use)

NB, for the 3 Bot scripts, make sure that you use a vechicle that has number of seats = 0 otherwise the players can get in which is bad.
Also, for JFW_Hunt_Attack and JFW_Hunt_Blow_Up, the sight range of the vechicle they are attatched to dictates how far away they will spot something to move to.
And, make sure that the thing you use can move (else the scripts wont work :)

JFW_Follow_Waypath (script to make a unit follow a waypath on creation)
	Waypathid (the waypath to follow)
	Speed (how fast to follow it)

JFW_Give_Money (gives money to whatever object sent the custom when a custom is triggered)
	Message (which message to trigger on)
	Entire_Team (give to entire team or just the player, 1 = entire team, 0 = player only)
	Amount (how much to give, positive means add money, negative means take it away)
	Use this script for example with a custom of 1000000025 to trigger when collected

JFW_2D_Sound_Custom (plays a 2d sound when a custom is recieved)
	Message (which message to trigger on)
	Preset (which sound to play)
Just attatch multiple copies of this to trigger multiple sounds

JFW_Random_Custom (fires off a custom at a random interval)
	Message (which message to send)
	ID (what to send it to)
	TimerNum (what number to use for the timer)
	Time_Min (minumum time for how long the timer should run for)
	Time_Max (maximum time for how long the timer should run for)
	Repeat (0 = fire off only once, 1 = fire off repeately)

JFW_Resource_Field (when entered by a resource collecter, a timer is started and a flag is cleared. If the resource collecter exits before the timer goes off, the flag is set. When the timer goes off, if the flag is clear, it will send a cash amount to the resource collecter)
	Cash (how much cash this field is worth)
	Time (how long the timer should run for before it grants the cash, i.e. the "resource collection time")
	TimerNum (what number to use for the timer)
	Collected_Preset (this preset will be created when the timer trips. Attatch a "destroy this after a short time" script to it)
	Collected_Preset_Distance (how far in units from the harvester the Harvested_Preset should appear. It will be created in a straight line from the direction the harvester is facing)
	Collected_Message (what message to send to the resource collecter to record the cash amount)
	Nod_Preset (the preset name of the Nod Resource Collector)
	GDI_Preset (the preset name of the GDI Resource Collector)
	StartHarvest (the message to send to the harvester when harvesting starts)
	StopHarvest (the message to send to the harvester when harvesting stops)
Use the last 2 with e.g. JFW_Enable_Disable_Animation_On_Custom to make the harvester animate while its harvesting
n.b., if there is already a resource collector in the zone, any zone entry events by other resource collectors will be ignored (so if the origonal collector leaves, the new collector then has to leave and re-enter to trigger the start of collection)

JFW_Resource_Collector (this should go on the resource collecter preset to make it work)
	Collected_Mesasge (what message will be sent to record the cash amount)
	Refinery_Message (what message will be sent by the refinery to identify that the refinery has been entered, when this is recieved, it will give the current cash total to the player)
	Cash_Limit (do not let the total cash amount get any larger than this, 0 = no limit)
	Cash_Type (how to record cash, 0 = when someone gets in, reset cash figure, 1 = when someone other than the person who was last in gets in, reset the cash amount, 2 = never reset the cash amount, 3 = same as 2 except it will reset the cash amount every time a "harvested" message is sent)
	Entire_Team (give to entire team or only to player, 0 = player, 1 = team
The cash amount is of course always reset when the refinery is triggered and the cash is delivered to the player.

JFW_Resource_Refinery (this handles the refinery, when its entered, it sends a message to the resource collecter which then gives the correct cash amount to the player)
	Refinery_Message (what message to send to the resorce collecter to identify that the refinery has been entered)
Make sure you make the zone big enough for these 3 scripts. Use JFW_Debug_Text_File to identify if the zone entry trigger is triggering or not.
Also, make sure that you set the script zones for the field and refinery to "check stars only" = off (otherwise, it wont trigger on the vechicle, only on its occupant. 
A good way to make sure that its triggering on the vechicle is to put a vechicle into your map at startup and use JFW_Debug_Text_File on the zone. If its working, you 
should see the ID of the vechicle you put at startup in the log file, in addition to the ID of the player.
BTW, you can also use a specific infantry unit as a valid preset name and it will still work as long as the infantry preset has the JFW_Resource_Collector attatched and as long as the refinery and field are set up right

JFW_Custom_Damage_Object (this takes health from an object when its sent a message)
	ID (what object to damage)
	Message (what message to trigger on)
	Damage (how much damage to do)
note that if you damage something where <damage> is >= <number of hit points the object currently has> it will disappear (this is to prevent unusable, unkillable, unremoveable "dead" objects littering the field)

JFW_Blow_Up_On_Custom (This script will create an explosion at the location of the object that sent the message when a message is sent)
	Explosion (the explosion to create)
	Message (the message to trigger on)
Use 1000000025 to make an exploding powerup

JFW_Blow_Up_Obj_On_Custom (This script will create an explosion at the location of the object that the script is attatched to when a message is sent)
	Explosion (the explosion to create)
	Message (the message to trigger on)
Use 1000000029 to make it blow up when someone exits and 1000000028 to make it blow up when someone enters it

JFW_Delay_Custom (This script will introduce a delay into a message that is sent to it)
	Message (the message to delay)
	Delay (the time to delay)
	ID (the ID of the thing to send it on to)

JFW_Startup_Custom (This script will send a custom when it starts)
	Message (the message to send)
	ID (the ID of the object to send it to)

JFW_Clear_Weapons (This script will remove the weapons from any object that enters the zone. If the object gets more weapons and re-enters the zone, they will disappear)
	(no parameters)

JFW_Zone_Send_Custom_Enable_Enter (sends a custom when a zone is entered or exited but only if its enabled)
	EnterMessage (message to send on entry)
	EnterParam (param to send on entry)
	ExitMessage (message to send on exit)
	ExitParam (param to send on exit)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Enable_Message (what message will turn the zone on)
	Disable_Message (what message will turn the zone off)

JFW_Zone_Send_Custom_Preset_Enter (sends a custom when a zone is entered or exited but only if the object that entered it is a specific preset)
	EnterMessage (message to send on entry)
	EnterParam (param to send on entry)
	ExitMessage (message to send on exit)
	ExitParam (param to send on exit)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Preset_Name (what preset name to trigger on)

JFW_Send_Custom_Zone_Enter (sends a custom when a zone is entered or exited)
	EnterMessage (message to send on entry)
	EnterParam (param to send on entry)
	ExitMessage (message to send on exit)
	ExitParam (param to send on exit)
	Team_ID (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
These last 3 send to the object that has entered or exited the zone

JFW_Gate_Zone (this script is usefull for doing a Tiberian Sun style gate)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Time (how long the gate should be open for)
	TimerNum (what number to use for the timer)
	ID (the ID of the gate object, needs to be a StaticAnimPhys, something like a door or a gate but without the Door settings (i.e. a StaticAnimPhys instead of a DoorPhys)
	Animation (the animation to play)
This one doesnt work in multiplayer, use JFW_Gate_Zone_2 instead

JFW_Repair_Zone (this script acts like a repair zone, when its entered it starts repairing the vechicle that entered it)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Repair_Distance (how far away from the "position" of the zone the vechicle can move before repairing stops)
	Repair_Health (how much health to add per timer)
When this is entered, it starts a timer with a period of 1 second, a different timer per vechicle (i.e. multiple vechicles can use this at once). It only works for things other than "Stars" (i.e. anything other than players)
Then, when the timer trips, it checks to see if the vechicle needs health, armour or both. Then, it ads "Repair_Health" worth of health to the object and restarts the timer.
If the vechcle moves more than "Repair_Distance" units away from the repair bay, it will stop repairing.
Also, to make the repair bay stop working when the building is blown up, use something like JFW_Death_Send_Custom and JFW_Custom_Destroy_Object to delete the zone.
Also, you need to use a Script_Zone_All for it or else it wont work.

JFW_Repair_Zone_No_Aircraft (like JFW_Repair_Zone but for land vechicles only)
JFW_Repair_Zone_Aircraft_Only (like JFW_Repair_Zone but for aircraft only)
	Preset1 (aircraft preset)
	Preset2 (aircraft preset)
	Preset3 (aircraft preset)
	Preset4 (aircraft preset)
	Preset5 (aircraft preset)
	Preset6 (aircraft preset)
	Preset7 (aircraft preset)
	Preset8 (aircraft preset)
Note that if you dont have 4 aircraft presets (or 4 per team), it doesnt matter what you put for the remaining parameters as long as you put something other than the name of a valid preset thats not an aircraft.
Note that if you have team-specific repair zones, you can have the Nod zone with the preset names of up to 4 Nod aircraft and the GDI zone with the preset names of up to 4 GDI aircraft)
All the stuff above pertaining to JFW_Repair_Zone also applies.

JFW_Base_Defence_No_Aircraft (like JFW_Base_Defence but for land vechicles only)
JFW_Base_Defence_Aircraft_Only (like JFW_Base_Defence but for aircraft only)
	Preset1 (aircraft preset)
	Preset2 (aircraft preset)
	Preset3 (aircraft preset)
	Preset4 (aircraft preset)
	Preset5 (aircraft preset)
	Preset6 (aircraft preset)
	Preset7 (aircraft preset)
	Preset8 (aircraft preset)
Note that if you dont have 4 aircraft presets (or 4 per team), it doesnt matter what you put for the remaining parameters as long as you put something other than the name of a valid preset thats not an aircraft.
Note that you can have the Nod defence with the preset names of up to 4 Nod aircraft and the GDI defence with the preset names of up to 4 GDI aircraft
All the stuff above pertaining to JFW_Base_Defence also applies.
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Building_Gun_No_Aircraft
JFW_Building_Gun_Weapon_No_Aircraft
These 2 are just like JFW_Building_Gun and JFW_Building_Gun_Weapon except that they take 2 extra paremeters:
	Preset1 (aircraft preset)
	Preset2 (aircraft preset)
	Preset3 (aircraft preset)
	Preset4 (aircraft preset)
	Preset5 (aircraft preset)
	Preset6 (aircraft preset)
	Preset7 (aircraft preset)
	Preset8 (aircraft preset)
They will ignore anything they would otherwise shoot at if the preset is one of the 4 specified
Note that if you dont have 4 aircraft presets (or 4 per team), it doesnt matter what you put for the remaining parameters as long as you put something other than the name of a valid preset thats not an aircraft.
Note that you can have the Nod defence with the preset names of up to 4 Nod aircraft and the GDI defence with the preset names of up to 4 GDI aircraft
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Building_Gun_Aircraft_Only
JFW_Building_Gun_Weapon_Aircraft_Only
These 2 are just like JFW_Building_Gun and JFW_Building_Gun_Weapon except that they take 2 extra paremeters:
	Preset1 (aircraft preset)
	Preset2 (aircraft preset)
	Preset3 (aircraft preset)
	Preset4 (aircraft preset)
	Preset5 (aircraft preset)
	Preset6 (aircraft preset)
	Preset7 (aircraft preset)
	Preset8 (aircraft preset)
They will ignore anything they would otherwise shoot at if the preset is not of the 4 specified
Note that if you dont have 4 aircraft presets (or 4 per team), it doesnt matter what you put for the remaining parameters as long as you put something other than the name of a valid preset thats not an aircraft.
Note that you can have the Nod defence with the preset names of up to 4 Nod aircraft and the GDI defence with the preset names of up to 4 GDI aircraft
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

N.B., the presets for the "aircraft" stuff above can be other things like spies, stealth units or whatever you like. They can be vechicles or infantry (except for the repair bay obviously)

JFW_Apply_Damage_On_Enter_Timer (This script will apply damage to the object that entered the zone as long as its in the zone)
	Warhead (the warhead to use)
	Damage (how much damage to do per timer tick)
	Time (how much time to wait before doing the next bit of damage)
	Distance (how far away from the location of the zone the object has to be before the damage stops)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc, doesnt apply for trigger type of 2 or 3)

JFW_Customs_Play_Cinematic (basicly, when its sent all the customs, it fires the cinematic)
	Message1 (first message)
	Message2 (second message)
	Message3 (third message)
	Message4 (forth message)
	Message5 (fifth message)
	Message6 (sixth message)
	Message7 (seventh message)
	Message8 (eighth message)
	Script_Name (the name of the *.txt script to fire)
	Location (the location to fire it off at)
	Facing (what direction to fire it off in)

Passing 0 for a message will cause that to be marked as "tripped" on startup (i.e. so you dont have to use all the customs)

JFW_Turret_Spawn_2 (Makes an object at it's controller's bone, this is a clone of Reborn_MMK2_Turret_Spawn but with the extra explosion_bone parameter)
	Turret_Preset (preset name of the object to spawn)
	Bone_Name (the name of the bone to attach the object to)
	Explosion_Preset (made at the bone when the MMK2 or whatevers dies to get rid of the object spawned)
	Explosion_Bone (where to make the explosion)

JFW_Zone_Send_Custom_Keycard (sends a custom when a zone is entered or exited but only if the object that entered it has a specific keycard)
	EnterMessage (message to send on entry)
	EnterParam (param to send on entry)
	ExitMessage (message to send on exit)
	ExitParam (param to send on exit)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Keycard_Number (the keycard number to look for) 

JFW_Zone_Send_Custom_Not_Preset (sends a custom when a zone is entered or exited but only if the object that entered it not a specific preset)
	ID (the id to send the messages to)
	EnterMessage (message to send on entry)
	EnterParam (param to send on entry)
	ExitMessage (message to send on exit)
	ExitParam (param to send on exit)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Preset_Name (what preset name to not trigger on)

With JFW_Zone_Send_Custom_Not_Preset, JFW_Zone_Send_Custom_Keycard, JFW_Zone_Send_Custom_Enable, JFW_Zone_Send_Custom_Preset, JFW_Zone_Send_Custom_Team and 
TDA_Send_Custom_Zone, passing 0 for EnterMessage or ExitMessage will cause no message to be sent. Passing 0 for EnterParam or ExitParam will cause
"the ID of the object that entered/exited the zone" to be passed as the parameter.

JFW_Teleport_Custom (teleports an object when sent a custom)
	Custom (the custom to look for, the parameter passed is the ID of the object to teleport)
	Location (Vector location of where to be sent)
	Object_ID (Object to teleport to) 

JFW_Give_Points_On_Death (this gives points to the player that kills whatever its attatched to)
	Points (how many points to give)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Whole_Team (give to team or just player)

JFW_Armour_Regen
	Time (how often to regen armour)
	TimerNum (timer number for the timer)
	Points (how much armour to add)

JFW_Heath_Regen
	Time (how often to regen health)
	TimerNum (timer number for the timer)
	Points (how much health to add) 

Note that with Armour_Regen and Health_Regen, the scripts heal the object the script is attatched to (so dont attatch it to a spawner and think you will make a regen powerup)
Use JFW_Attatch_Script for regen powerups.

JFW_Random_Teleport_Custom (like JFW_Teleport_Custom but teleports to 1 of 5 random locations)
	Custom (the custom to look for, the parameter passed is the ID of the object to teleport)
	Location1 (Vector location of where to be sent)
	Object_ID1 (Object to teleport to)
	Location2 (Vector location of where to be sent)
	Object_ID2 (Object to teleport to)
	Location3 (Vector location of where to be sent)
	Object_ID3 (Object to teleport to)
	Location4 (Vector location of where to be sent)
	Object_ID4 (Object to teleport to)
	Location5 (Vector location of where to be sent)
	Object_ID5 (Object to teleport to) 

JFW_Timed_Teleport_Custom (like JFW_Teleport_Custom but has to wait n time before it can teleport again)
	Time (how long before it resets)
	TimerNum (timer number for the timer)
	Custom (the custom to look for, the parameter passed is the ID of the object to teleport)
	Location (Vector location of where to be sent)
	Object_ID (Object to teleport to) 

JFW_Blow_Up_Location_On_Custom (This script will create an explosion at the location specified in the script when a message is sent)
	Explosion (the explosion to create)
	Location (the loaction to create the explosion)
	Message (the message to trigger on)

JFW_Domination_Zone (when entered, displays 1 of 2 models and sends
	Controler_ID (ID of the controller, a daves arrow or something)
	NeutralCustom (what custom to send to the controler if the zone was neutral before it was captured)
	OwnedCustom (what custom to send to the controler if the zone was already owned before it was captured)
	Nod_Model (name of the w3d file to use for the "Nod has captured the zone" model)
	GDI_Model (name of the w3d file to use for the "GDI has captured the zone" model)
	Neutral_Model (name of the w3d file to use for the "no-one has captured the zone yet" model)
	Capture_Delay_Time (how many seconds to wait after its captured before the zone can change hands again)
	TimerNum (timer number for the timer)
Note that the parameters should be without the .w3d on the end. (e.g. if the w3d is abc.w3d, pass abc)
Also, note that the models wont animate, even if there is animation info in the w3d file (because I dont know how to make
animation work in this case)
Using models instead of presets makes the code better and easier to test/debug plus also it makes things more light-weight (since you dont
actually need a preset)

JFW_Domination_Controler (controler for the domination mode)
	NeutralCustom (what custom to send to the controler if the zone was neutral before it was captured)
	OwnedCustom (what custom to send to the controler if the zone was already owned before it was captured)
	Time (how often to give points)
	TimerNum (timer number for the timer)
	PointsToGive (how many points to give to GDI for each GDI zone/Nod for each Nod zone)
	PointsToTake (how many points to take from Nod for each GDI zone/GDI for each Nod zone)
	GDIObjectID (the ID of an object somewhere that is gauranteed to remain around for the entire game and that is owned by GDI, this is needed to give points to GDI)
	NodObjectID (the ID of an object somewhere that is gauranteed to remain around for the entire game and that is owned by Nod, this is needed to give points to Nod)

The GDIObjectID and NODObjectID should refer to objects placed on the map somewhere that are hidden (so the player doesnt know they are there)
Also note that (due to factors beoynd my control), it is possible for the points for a team to go negative. However, if they capture enough zones, points can go positive again)

JFW_Object_Draw_In_Order (draws a series of models in order)
	Location (where to draw the model)
	Custom (what custom will cause the next model to be shown)
	BaseName (the base name of the models, numbers from 1 on up will be appended to this to generate the actual name)
	Count (how many models to show)

JFW_Object_Draw_Random (same thing as JFW_Object_Draw_In_Order but random order)
	Location (where to draw the model)
	Custom (what custom will cause the next model to be shown)
	BaseName (the base name of the models, numbers from 1 on up will be appended to this to generate the actual name)
	Count (how many models to show)
	if basename is abc the first model would be abc1.w3d then abc2.w3d and so on up to abc9.w3d then abc10.w3d

JFW_3D_Sound_Custom (plays a 3d sound when it recieves a custom)
	Message (which message to trigger on)
	Preset (which sound to play)
	Position (the position to play the sound at) 

JFW_Weapon_Buy (this script is supposed to act as a "purchase point" for weapons, it triggers on zone entry)
	Weapon_Name (the name of the weapon to grant, any valid powerup name should work)
	Cost (the cost)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc)
Note that if the player doesnt have enough cash, no purchase will take place

JFW_Heal_Zone (this script acts like a heal zone, when its entered it starts healing the infantry that entered it)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Heal_Distance (how far away from the "position" of the zone the infantry can move before healing stops)
	Heal_Health (how much health to add per timer)
When this is entered, it starts a timer with a period of 1 second, a different timer per infantry (i.e. multiple infantry units can use this at once). It only works for things other than "Stars" (i.e. anything other than players)
Then, when the timer trips, it checks to see if the infantry needs health, armour or both. Then, it ads "Heal_Health" worth of health to the object and restarts the timer.
If the vechcle moves more than "Heal_Distance" units away from the heal zone, it will stop healing.
Also, to make the heal zone stop working when the building is blown up, use something like JFW_Death_Destroy_Object to delete the zone.

JFW_Disable_Transitions_Zone (when a vechicle enters this zone, transitions are disabled, when it exits the zone, transitions are enabled)

JFW_Bounce_Zone_Entry_All_Directions (this script adds a fixed value to the position of anything that enters the zone)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	ZAmount (what to add to the position)
	Amount (what to add to the x,y position in the direction the object is facing)

JFW_Death_Destroy_Object (will destroy an object when the thing its attatched to dies)
	ID (what object to destroy, dont use this for buildings/building controlers)

JFW_Drive_To_Player (when created, this object will drive to the nearest player)
	Speed (how fast to drive)
	Arrive_Distance (how close to the player to arrive)
Note, if there is no player around, this script may fail or crash renegade. So make sure its only 
used on vechicles that are created at run-time, not vechicles that are on the map at startup

JFW_Invulnerability_Timer (invulerability script for iron curtain and whatever else you want)
	Invulerability_Time (how long to be invulnerable for)
	Invunerability_TimerNum (tumer number for the invulnerability timer)
Note that because of how this works, if the object is damaged enough to kill it in one hit, it will probobly still die.
Since there is no other way to make things invulnerable, this is the best I can do.

JFW_Iron_Curtain_Zone (zone script for iron curtain)
	Time (charge timer)
	TimerNum (charge timer number)
	Animation1 (animation 1 script)
	Animation1Loc (animation 1 location)
	Animation1Facing (animation 1 facing)
	Animation1Slot (animation 1 slot number)
	Animation2 (animation 2 script)
	Animation2Loc (animation 2 location)
	Animation2Facing (animation 2 facing)
	Animation2Slot (animation 2 slot number)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Animation3 (animation 3 script)
	Animation3Loc (animation 3 location)
	Animation3Facing (animation 3 facing)
	Animation3Slot (animation 3 slot number)
	BuildingID (building ID)
	Invulerability_Time (invulnerability time)
	Invunerability_TimerNum (invulnerability timer number)
	Animation1Msg (message that is sent by the Animation 1 script to indicate that its finished)
	Animation2Msg (message that is sent by the Animation 2 script to indicate that its finished)
	Animation3Msg (message that is sent by the Animation 3 script to indicate that its finished)
	OffID (powered off object ID)
	OnID (powered on object ID)
	CinematicPowerOff (hide the objects before playing the cinematics?, 0 = indicates dont hide, 1 = hide)

To make it stop working when the power goes down or the building, use JFW_Death_Destroy_Object
What this script does:
On startup, sets the enabled flag to false, hides the "powered on" object and shows the "powered off" object
Then, starts the charge timer
On zone entry, it checks the player type to make sure its the right team and also checks the zone is enabled
Then, if the object that entered the zone is a player, it disables the zone (this way, if a player drives a 
vechicle in, both player and vechicle get the effect).
Then, it re-starts the charge timer (ready for the next use of the zone)
And, it plays animation 2 (activated)
If the CinematicPowerOff flag is set to 1, it will hide both objects before playing the cinematic.
The cinematic will only play and the charge timer will only be reset when the player enters, not the vechicle (that way it doesnt play twice)
Plus, it attatches the JFW_Invulnerability_Timer script to make the vechicle invulnerable
On death of the zone, it plays animation 3 (power down) but only if its currently powered up.
If the CinematicPowerOff flag is set to 1, it will hide both objects before playing the cinematic.
On timer expired, if the timer that expired was the charge timer, it plays animation 1 (powerup) and enables the zone
If the CinematicPowerOff flag is set to 1, it will hide both objects before playing the cinematic.
On custom, if the message is the first animation message, it shows the "power on" object and hides the "power off" object.
If it is the second animation message, it plays animation 3 (power down)
If it is the third animation message, it shows the "power off" object and hides the "power on" object.

JFW_Chrono_Controler_Zone (zone script for the chronosphere)
	Spawner_Time (how long before the beacon will spawn)
	Spawner_TimerNum (timer number for the beacon timer)
	Spawner_Preset (beacon powerup preset)
	Spawner_Location (beacon powerup spawn location)
	Chrono_Time (time the zone is active for)
	Chrono_TimerNum (timer number for the active timer)
	Activate_Time (time from when the beacon is planted to when the zone goes live)
	Activate_TimerNum (timer number for the active timer)
	DeathMessage (message to indicate beacon disablement)
	Message (message to indicate beacon placement)
	Animation1 (animation 1 script)
	Animation1Loc (animation 1 location)
	Animation1Facing (animation 1 facing)
	Animation1Slot (animation 1 slot number)
	Animation2 (animation 2 script)
	Animation2Loc (animation 2 location)
	Animation2Facing (animation 2 facing)
	Animation2Slot (animation 2 slot number)
	Animation3 (animation 3 script)
	Animation3Loc (animation 3 location)
	Animation3Facing (animation 3 facing)
	Animation3Slot (animation 3 slot number)
	BuildingID (building ID)
	ZAdjust (how much to add to the Z when teleporting, so you dont teleport into the ground)
	Animation1Msg (message that is sent by the Animation 1 script to indicate that its finished)
	Animation2Msg (message that is sent by the Animation 2 script to indicate that its finished)
	Animation3Msg (message that is sent by the Animation 3 script to indicate that its finished)
	OffID (powered off object ID)
	OnID (powered on object ID)
	CinematicPowerOff (hide the objects before playing the cinematics?, 0 = indicates dont hide, 1 = hide)

On startup, it disables the zone and starts the spawner timer.
And it hides the "power on" object and shows the "power off" object.
On custom, if its the beacon custom it records the position of the beacon object and starts the beacon timer.
If its the death custom, it sets the flag to tell the script that its recieved the death custom
If its the first animation message, it shows the "power on" object and hides the "power off" object.
If it is the second animation message, it plays animation 3 (power down)
If it is the third animation message, it shows the "power off" object and hides the "power on" object.
on zone entered it checks to see if the zone is enabled
then it disables the zone
then it plays animation 2 (activated)
If the CinematicPowerOff flag is set to 1, it will hide both objects before playing the cinematic.
and then it teleports to the stored location + the ZAdjust
On death of the zone, it plays animation 3 (power down) but only if its currently powered up.
If the CinematicPowerOff flag is set to 1, it will hide both objects before playing the cinematic.
On timer expired, if its the spawner timer that expired, it creates the object specified
If its the beacon timer, and it hasnt recieves the beacon death message, it enables the zone and plays animation 1 (powerup)
If the CinematicPowerOff flag is set to 1, it will hide both objects before playing the cinematic.
if its the chrono timer and the zone is still enabled, it plays animation 3 (power down) and starts the spawner timer again and also disables the zone
If the CinematicPowerOff flag is set to 1, it will hide both objects before playing the cinematic.
This last test makes sure that when the zone is disabled by it being acivated, it doesnt play the power down animation on an 
already powered down chronosphere

This is what happens when the Iron Curtain script/Chronosphere script play the animations:
Firstly, an Invisible_Object is created at the appropriate location.
Then the facing is set for that object.
Then the script Test_Cinematic is attatched to the object with the correct parameter.
Then the "BuildingID" parameter is sent to the object along with the slot number. Basicly, the Test_Cinematic script
will take this ID and will put the object it corresponds to into the appropriate slot (where it can then be accessed
in the cinematic just like an object created with the cinematic object creation commands)
Note that the custom must send the appropriate message (with the Send_Custom script command) to tell the object the cinematic has finished

The "powered on" and "powered off" objects are objects that are placed in leveledit (tiles for example) that look the same except that one plays an effect or something to indicate "power on".

JFW_Looping_Cinematic (plays a cinematic on a repeating timer, starting at object creation)
	Script_Name (the name of the *.txt script to fire)
	Location (the location to fire it off at)
	Facing (what direction to fire it off in)
	Time (time to wait before re-starting the cinematic)
	TimerNum (timer number)

JFW_Spawn_Object_Death_Enable (This script will create an object upon death of a unit, does not work on player spawners, only if its enabled)
	Drop_Object (Preset STRING Name) example POW_Flamethrower_Player
	Drop_Height (Z "modifier") example 2.0 (This is to adjust the height for the dropped object, usually only used for vehicles). 
	Enable_Message (what message will be sent to enable the drop)
	Disable_Message (what message will be sent to disable the drop)
	A good default for weapons, keycards etc is 0.25 (the figure is in meters)
	Note that the spawned object will be facing the same way as the object that died

JFW_Spawn_Object_Death_Enable_Random (This script will create an object upon death of a unit, does not work on player spawners, only if its enabled, with random chance to spawn/not spawn)
	Drop_Object (Preset STRING Name) example POW_Flamethrower_Player
	Drop_Height (Z "modifier") example 2.0 (This is to adjust the height for the dropped object, usually only used for vehicles). 
	Enable_Message (what message will be sent to enable the drop)
	Disable_Message (what message will be sent to disable the drop)
	Probobility (what % chance for the drop to happen)
	A good default for weapons, keycards etc is 0.25 (the figure is in meters)
	Note that the spawned object will be facing the same way as the object that died

One use for these last 2 is to make a Viceroid spawn when something dies inside a tiberium field.
Use the zone send custom scripts plus one of the 2 above to implement the feature

JFW_Spawn_Object_Death_Random (This script will create an object upon death of a unit, does not work on player spawners, with random chance to spawn/not spawn)
	Drop_Object (Preset STRING Name) example POW_Flamethrower_Player
	Drop_Height (Z "modifier") example 2.0 (This is to adjust the height for the dropped object, usually only used for vehicles). 
	Probobility (what % chance for the drop to happen)
	A good default for weapons, keycards etc is 0.25 (the figure is in meters)
	Note that the spawned object will be facing the same way as the object that died

JFW_Created_Send_Custom (this script will send a custom when the object its attatched to is created)
	ID (the object to send it to)
	Message (the message to send)

JFW_Damaged_Send_Custom (this script will send a custom when the object its attatched to is damaged)
	ID (the object to send it to)
	Message (the message to send)

JFW_Enemy_Seen_Send_Custom (this script will send a custom when the object its attatched to spots an enemy)
	ID (the object to send it to)
	Message (the message to send)
Note that for this one, the Parameter for the message is the ID of the enemy object that was seen.
You could use this script on an object combined with e.g. JFW_Teleport_Custom to make a "transport 
any enemies seen by this object to x location" setup.

JFW_Create_Object_Custom (will spawn an object when it recieves a custom)
	Object (preset to spawn)
	Location (where to spawn)
	Facing (direction to face)
	Mesasge (message to listen for)

JFW_Enable_Spawner_On_Custom (will enable or disable a spawner when sent a custom)
	ID (the ID of the spawner)
	Enable (1 = enable, 0 = disable)
	Message (the message to listen for)

JFW_Set_Animation_On_Custom (starts an animation when a custom is sent)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Loop (whether to loop or not, 0 = not loop, 1 = loop)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	Message (message to listen for)
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)

JFW_Enable_Disable_Animation_On_Custom (enables or disables an animation on custom)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	Enable (enable message)
	Disable (disable message)
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
Also, note that the disable wont happen untill the animation finishes its next play.
When enabled, it will loop automaticly.

JFW_Vechicle_Animation (script for animated vechicles such as bots or mecha)
	Time (how often to check for movement, 0.1 is a good value)
	TimerNum (number for the timer)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
How this script works:
On created, it sets the stored position to 0,0,0 (this is because vechicles can fall slightly when created)
It also sets the "enabled" flag to false.
And it starts a timer to check for movement (since there is no direct way to detect movement)
On timer expired, it checks the current position of the object against the stored position, if they are different it stores the new position.
But first, it checks if the stored position is 0,0,0, if it is, it sets it to the current position.
If the enabled flag is false, it starts the animation and sets the enabled flag to true.
If the positions are the same, it sets the enabled flag to false.
The animation will loop until the vechicle stops moving then stop animating

I recommend using weapons without "recoil" (or whatever engine feature it is that makes e.g. the med tank move backwards slightly when it fires)
since it will look better :)
Also, due to how it works, it will probobly start animating while its being carried in by the Airstrip Cargo Plane

JFW_Custom_Toggle_Visible (toggles whether an item will be visible (i.e. rendered) or not)
	Mesasge (the message to listen for)
	Visible (0 = invisible, 1 = visible)

JFW_Visible_Person_In_Vechicle (makes a person model show up in a vechicle when someone is inside it)
	BoneName (the bone to attatch the person model to)
	ModelName (the name of the w3d file to use for the person model, without the .w3d on the end)
	Animation (the name of the animation to play on the person model, it will loop indefinatly as long as the person model is visible)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)

Note that only one model will appear no matter how many people are in the vechicle
However, if you want 2 models to appear (e.g. if you want 1 model for gunner and 1 for driver), check the script below.
Also, there is no way to make different characters show different models when inside the vechicle, there is a different script for that.

JFW_Visible_People_In_Vechicle (makes a person model show up in a vechicle when someone is inside it, this one does it twice for 2 people in the vechicle)
These parameters apply to the model that will be used when the first person enters the vechicle
	BoneName1 (the bone to attatch the person model to)
	ModelName1 (the name of the w3d file to use for the person model, without the .w3d on the end)
	Animation1 (the name of the animation to play on the person model, it will loop indefinatly as long as the person model is visible)
	Subobject1 (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame1 (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame1 (frame to go to, -1 means "end of animation")
	Blended1 (some value for blended animation, only applies to Solders)
These parameters apply to the model that will be used when the second person enters the vechicle.
	BoneName2 (the bone to attatch the person model to)
	ModelName2 (the name of the w3d file to use for the person model, without the .w3d on the end)
	Animation2 (the name of the animation to play on the person model, it will loop indefinatly as long as the person model is visible)
	Subobject2 (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame2 (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame2 (frame to go to, -1 means "end of animation")
	Blended2 (some value for blended animation, only applies to Solders)

If a third person enters the vechicle, nothing happens (i.e. no more models are displayed)
Note that the Worldbox of the character model may cause the vechicle not to move properly.
So, using a character model without a worldbox may be necessary. (I dont know gmax so I cant be sure)

JFW_Blow_Up_On_Enter_Random (This script will create an explosion at the location of the object that entered the zone, there is a % chance that this will happen)
	Explosion (the explosion to create)
	Probobility (what % chance for the explosion to happen)

JFW_Zone_Send_Custom_Cost (this script sends a custom on zone entry but only if the player can pay the cost specified, it will take money away if the cost is payable)
	ID (what object to send the custom to)
	Message (message to send)
	Param (what parameter to send, 0 means "the ID of the thing that entered the zone)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Cost (how much money to take away, use positive numbers to remove money. Dont use negative numbers, they wont work)

JFW_Engineer_Target (clone of M03_Engineer_Target)

JFW_Engineer_Repair (clone of M03_Engineer_Repair)
	Repair_Priority (priority for repairing)

To prevent the problem where when you get out of a vechicle, it is no longer being repaired by the bots, use NH_SetTeam_OnLeave, it should work.
Also, in addition, JFW_Engineer_Target has been modified to check the Shield Strength (i.e. armour) of the object in addition to the health.
The repair object can be any vechicle or infantry that has a repair gun weapon and wheels/legs/tracks/whatever so it can move.
Also, there is a limit to how far away the repair script will detect a damaged target (since I cant find the sound presets its using, I cant identify how far that is)

JFW_Vechicle_Damage_Zone (clone of JFW_Apply_Damage_On_Enter_Timer but for vechcles only)
	Warhead (the warhead to use)
	Damage (how much damage to do per timer tick)
	Time (how much time to wait before doing the next bit of damage)
	Distance (how far away from the location of the zone the object has to be before the damage stops)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc, doesnt apply for trigger type of 2 or 3)
This script damages vechicles only, not infantry

JFW_Cinematic_Attack (when this script is created, it will attack a specifc object, use in cinematics for example)
	Priority (priority for the action)
	ID (the object to attack)
	Range (maximum effective range of the attack)
	Deviation (deviation of the attack)
	Primary (1 = use primary weapon,2 = dont use primary weapon)

JFW_Customs_Send_Custom (basicly, when its sent all the customs, it sends another custom)
	Message1 (first message)
	Message2 (second message)
	Message3 (third message)
	Message4 (forth message)
	Message5 (fifth message)
	Message6 (sixth message)
	Message7 (seventh message)
	Message8 (eighth message)
	Mesasge (the message to send)
	Param (the parameter to send)
	ID (the object to send it to)

Passing 0 for a message will cause that to be marked as "tripped" on startup (i.e. so you dont have to use all the customs)
Note that you can dasy-chain these if you need more customs.

JFW_Object_Draw_In_Order_2 (draws a series of models in order)
	Location (where to draw the model)
	Custom (what custom will cause the next model to be shown)
	BaseName (the base name of the models, numbers from Start_Number on up will be appended to this to generate the actual name)
	Count (how many models to show)
	Start_Number (what model number to start at)

JFW_Custom_Multiple_Send_Custom (when this recieves a particular custom a certain number of times it sends a custom)
	RecieveMessage (message to recieve)
	RecieveCount (how many times to recieve, when it has recieved it exactly this many times, it sends the other custom)
	SendMessage (message to send)
	SendParam (parameter to send)
	SendID (ID of object to send it to)

JFW_Create_Destroy_Object_On_Custom (creates an object on a custom then destroys it on another custom)
	Location (where to create the object)
	Facing (what direction it should face)
	Preset (what preset to use)
	CreateMessage (message for creation)
	DestroyMessage (message for destruction)

JFW_Create_Destroy_Object_On_Custom_Animate (creates an object on a custom plus sets an animation on it then destroys it on another custom)
	Location (where to create the object)
	Facing (what direction it should face)
	Preset (what preset to use)
	CreateMessage (message for creation)
	DestroyMessage (message for destruction)
	Animation (animation to play on creation)
	Loop (whether to loop or not, 0 = not loop, 1 = loop)
	Subobject (the subobject to use for the creation animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)

JFW_Create_Destroy_Object_On_Custom_Animate_2 (creates an object and sets an animation on it on a custom then plays another animation on a second custom and destroys the object when the second animation is finished)
	Location (where to create the object)
	Facing (what direction it should face)
	Preset (what preset to use)
	CreateMessage (message for creation)
	DestroyMessage (message for destruction)
	CreateAnimation (animation to play on creation)
	CreateLoop (whether to loop or not, 0 = not loop, 1 = loop)
	CreateSubobject (the subobject to use for the creation animation, a value of 0 will mean "no subobject")
	CreateFirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	CreateLastFrame (frame to go to, -1 means "end of animation")
	CreateBlended (some value for blended animation, only applies to Solders)
	DestroyAnimation (animation to play on destroy)
	DestroySubobject (the subobject to use for the destroy animation, a value of 0 will mean "no subobject")
	DestroyFirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	DestroyLastFrame (frame to go to, -1 means "end of animation")
	DestroyBlended (some value for blended animation, only applies to Solders)
	Time (how long to wait after starting the DestroyAnimation before destroying the object)
	TimerNum (number to use for the timer)

JFW_Damaged_Send_Custom_Amount (sends a custom when the object is damaged based on how much damage was done)
	ID (object to send the message to)
	Message1 (message to send when the damage amount is less than the specified amount)
	Message2 (message to send when the damage amount is greater than or equal to the amount)
	Damage (amount of damage to test for, negative amounts mean repair, positive mean damage)

JFW_Invulnerable_On_Custom (makes an object invulnerable or turns it off when sent a custom)
	Message (message to wait for, send 1 for parameter to turn on, 0 for parameter to turn off)
The object made invulnerable will still die if its hit by a weapon big enough to kill it in one hit.
But unfortunatly, there is nothing I can do about that :(

JFW_Invulnerable_On_Custom_2 (makes an object invulnerable or turns it off when sent a custom)
	Message (message to wait for, send 1 for parameter to turn on, 0 for parameter to turn off)
	InvulnerableArmour (armour type to use when its invulnerable)
	NormalArmour (armour type to restore it to when it stops being invulnerable)
This is a better version of JFW_Invulnerable_On_Custom that overcomes the limitation mentioned above.
Use Blamo for the invulnerable armour, this should protect against everything.
The bad news is that it appears as though buildings ignore the Shield settings altogether.
I set the shield type to Blamo and the shield strength and max shield strength to 1000 on a 
refinery controler and I was still able to shoot at it with an orca. So, this script doesnt work on buildings :(

JFW_Per_Preset_Visible_Person_In_Vechicle (makes a person model show up in a vechicle when someone is inside it)
	BoneName (bone to attatch the person object to)
	Message (message to send)

JFW_Per_Preset_Visible_People_In_Vechicle (makes a person model show up in a vechicle when someone is inside it, this one does it twice for 2 people in the vechicle)
	BoneName1 (bone name to attatch the person object to for the first model)
	BoneName2 (bone name to attatch the person object to for the second model)
	Message1 (message to send for the first model)
	Message2 (message to send for the second model)

JFW_Visible_Person_Settings (script for doing the per-infantry-preset part of the visible people logic)
	Message (message to listen for)
	ModelName (the name of the w3d file to use for the person model, without the .w3d on the end)
	Animation (the name of the animation to play on the person model, it will loop indefinatly as long as the person model is visible)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)

Basicly, you stick JFW_Visible_Person_Settings on an infantry preset and JFW_Per_Preset_Visible_Person_In_Vechicle or JFW_Per_Preset_Visible_People_In_Vechicle on the vechicle preset.
If you dont put JFW_Visible_Person_Settings on an infantry unit, you will get an invisible model.
Dont forget to do it for both teams (even if you only have vechicles with visible drivers for one team, remember that the other team may steal one)
You can use different messages (and different settings for JFW_Visible_Person_Settings) for each vechicle if you want.
The model you use must have no worldbox/boundingbox/etc and should have all collision flags set to off.

JFW_Building_Explode_No_Damage (clone of M00_BUILDING_EXPLODE_NO_DAMAGE_DAK

JFW_Viceroid_Innate (clone of M00_Viceroid_Innate_DAY)

JFW_No_Innate (clone of M00_No_Innate)

JFW_Credit_Trickle (clone of GTH_Credit_Trickle)
	Credits (how many credits to give)
	Delay (how often to give them)

JFW_PCT_Pokable (clone of M00_PCT_Pokable_DAK)
This script will now be used instead of the westwood one, it contains a fix to prevent the cheat where cheaters can shoot the PTs, killing them.

JFW_Vechicle_Regen (clone of M00_Vechicle_Regen_DAK)

JFW_Disable_Transition (clone of M00_Disable_Transition)

JFW_Permanent_No_Falling_Damage (clone of M00_Permanent_No_Falling_Damage_IML)

JFW_Death_Powerup (clone of M00_Death_Powerup)

JFW_GrantPowerup_Created (clone of M00_GrantPowerup_Created)

JFW_CnC_Crate (clone of M00_CnC_Crate)

JFW_Tiberium_Refinery (clone of M00_Tiberium_Refinery)
	MoneyAmount (how many credits to give)
	Delay (how often to give them)

JFW_GrantMoney_Powerup (clone of M00_GrantMoney_Powerup)
	ScoreAmount (how much cash to give)
	Entire_Team (give to everyone)
	Randomizer (randomize how much cash to give)

JFW_GrantScore_Powerup (clone of M00_GrantScore_Powerup)
	ScoreAmount (how many points to give)
	Entire_Team (give to everyone)
	Randomizer (randomize how many points to give)

JFW_Disable_Physical_Collision (clone of M00_Disable_Physical_Collision_JDG)

JFW_Enable_Physical_Collision (clone of M00_Enable_Physical_Collision_JDG)

JFW_DestroyedStateObject (clone of M00_DestroyedStateObject_DAY)
	OriginalModelFacing (direction to make the destroyed state object face)
	DestroyedModelPreset (preset to use for the destroyed state object)

JFW_Play_Sound (clone of M00_Play_Sound)
	Sound_Preset (sound preset to use)
	Is_3D (is it a 3d sound)
	Offset (offset from object this is attatched to to play the sound)
	Offset_Randomness (randomness for the offset)
	Frequency_Min (minumum replay frequency)
	Frequency_Max (maximum replay frequency)

JFW_Engine_Sound (clone of RMV_Engine_Sound)
	Preset (preset to play)
	Bone (bone to play it on)

JFW_Building_Gun_Secondary
JFW_Building_Gun_Weapon_Secondary
JFW_Building_Gun_No_Aircraft_Secondary
JFW_Building_Gun_Weapon_No_Aircraft_Secondary
JFW_Building_Gun_Aircraft_Only_Secondary
JFW_Building_Gun_Weapon_Aircraft_Only_Secondary

These scripts are clones of the non-secondary version 
with the only difference being that they alternate 
between primary and secondary weapons when firing
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Base_Defence_Secondary
JFW_Base_Defence_No_Aircraft_Secondary
JFW_Base_Defence_Aircraft_Only_Secondary

These scripts are clones of the non-secondary version 
with the only difference being that they alternate 
between primary and secondary weapons when firing
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Base_Defence_Animated (new version of JFW_Base_Defence that has an animation that is played before and after firing.
	MaxAttackDistance (maximum distance away from the object that attack will take place)
	AttackTimer (how long the defence should stay "active" (e.g. the popup sam site stay popped up)
	Animation (what animation to play on the defence vechicle
	LastFrame (how long the animation is in frames)
	PopupTime (how long it should wait after it starts the animation before it attacks stuff, this is to give it enough time to finish animating)	
Note that it will play the animation from 0 to "lastframe" when it activates and then from "lastframe" to 0 when it deactivates.
Note that this script has had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

There is a gmax file in the buildings.zip on the westwood FTP site in the single_player\NOD sam site\_current\_keep folder called b_samsite-up.gmax.
This gmax file should be usable as-is with no modifications for this script.

JFW_Base_Defence_Animated_No_Aircraft same as JFW_Base_Defence_Animated but only pops up and attacks presets not in the list
JFW_Base_Defence_Animated_Aircraft_Only same as JFW_Base_Defence_Animated but only pops up and attacks presets in the list
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Base_Defence_Animated_Secondary
JFW_Base_Defence_Animated_No_Aircraft_Secondary
JFW_Base_Defence_Animated_Aircraft_Only_Secondary
These scripts are clones of the non-secondary version 
with the only difference being that they alternate 
between primary and secondary weapons when firing
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Building_Gun_Animated (version of JFW_Building_Gun that allows for a charge animation before it fires)
	Disable_Custom (what custom to use internally to disable the building when the power goes out or when the building is destroyed)
	Positon (what offset from the building controller to spawn the weapon at)
	Weapon (what "vechicle" to use for the weapon, e.g. GDI_AGT is for the AGT missile)
	Visible (if the "vechicle" should be visible (like the AGT guns) or invisible (like the AGT missile), 0 = invisible, 1 = visible)
	Min_Range (if the thing its going to shoot at is closer than this range not counting any differences in Z position, it wont be shot at)
	Max_Range (if the thing its going to shoot at is further away than this range, it wont be shot at)
	EffectPreset (preset to use for the charge effect)
	EffectAnimation (animation to use for the charge effect)
	EffectTime (how long to wait after starting the charge effect animation before firing)
	EffectFrame (last frame of the effect animation)

JFW_Building_Gun_Animated_Weapon (version of JFW_Building_Gun_Weapon that allows for a charge animation before it fires)
	Disable_Custom (what custom to use internally to disable the building when the power goes out or when the building is destroyed)
	Visible (if the "vechicle" should be visible (like the AGT guns) or invisible (like the AGT missile), 0 = invisible, 1 = visible)
	Min_Range (if the thing its going to shoot at is closer than this range not counting any differences in Z position, it wont be shot at)
	Max_Range (if the thing its going to shoot at is further away than this range, it wont be shot at)	
	EffectPreset (preset to use for the charge effect)
	EffectAnimation (animation to use for the charge effect)
	EffectTime (how long to wait after starting the charge effect animation before firing)
	EffectFrame (last frame of the effect animation)
Note that this script has had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

Tips when making this:
Make sure that the team of the gun is different from the team of the thing its shooting at, otherwise it wont work.
Also, the JFW_Building_Gun script is very sensitive to the sight range of the "gun" vechicle, make sure that the sight
range of the gun vechicle and the range of the weapon preset are all BIGGER than the max range set in the script.
Also, with the animation, it starts at frame 0 when its not shooting. Then, when it charges up, it goes from frame 0 to EffectFrame.
Then, when it fires (i.e. after EffectTime has run out), it goes back from EffectFrame to 0.

JFW_Building_Gun_Animated_No_Aircraft same as JFW_Building_Gun_Animated but only attacks presets not in the list
JFW_Building_Gun_Animated_Aircraft_Only same as JFW_Building_Gun_Animated but only attacks presets in the list
JFW_Building_Gun_Animated_Weapon_No_Aircraft same as JFW_Building_Gun_Animated_Weapon but only attacks presets not in the list
JFW_Building_Gun_Animated_Weapon_Aircraft_Only same as JFW_Building_Gun_Animated_Weapon but only attacks presets in the list
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Building_Gun_Animated_Secondary
JFW_Building_Gun_Animated_Weapon_Secondary
JFW_Building_Gun_Animated_No_Aircraft_Secondary
JFW_Building_Gun_Animated_Weapon_No_Aircraft_Secondary
JFW_Building_Gun_Animated_Aircraft_Only_Secondary
JFW_Building_Gun_Animated_Weapon_Aircraft_Only_Secondary
These scripts are clones of the non-secondary version 
with the only difference being that they alternate 
between primary and secondary weapons when firing
Note that these scripts have had a bug fix in 1.8 so it will always attack the vechicle, never the pilot of the vechicle (obviously once the vechile is gone, the pilot is shot at)

JFW_Play_Animation_Destroy_Object (on startup, this script plays an animation once and when the animation finishes, it destroys itself)
	Animation (the animation to use)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)

JFW_Custom_Send_Custom_Parameter (this script listens for messages in a certain range and sends it on)
	ID (ID of object to send to)
	BaseMessage (first message)
	Limit (last message)
What this script does is, when it gets a message that is >= BaseMessage and <= Limit, it subtracts 
BaseMessage from the passed in message. Then, it sends that value as the param and BaseMessage as the message.
It sends it to the object denoted by ID

JFW_Create_Destroy_Object_On_Custom_Bone (creates an object on a custom then destroys it on another custom)
	Location (where to create the object)
	Facing (what direction it should face)
	Preset (what preset to use)
	CreateMessage (message for creation)
	DestroyMessage (message for destruction)
	BoneName (which bone on the object holding the JFW_Create_Destroy_Object_On_Custom it should attach the created object to)

JFW_Mobius_Script (clone of Dr_Mobius_Script)

JFW_ArmorMedal_TextMessage (clone of M00_ArmourMedal_TextMessage_JDG)

JFW_HealthMedal_TextMessage (clone of M00_HealthMedal_TextMessage_JDG)

JFW_C130_Explosion (clone of M00_C130_Explosion)

JFW_Send_Object_ID (clone of M00_Send_Object_ID)
	Receiver_ID (the reciever of the message)
	Param (the parameter to send)
	Delay (the delay before sending)

JFW_Ion_Cannon_Sound (clone of M00_Ion_Cannon_Sound)
	Number (sound number to use)

JFW_NukeStrike_Anim (clone of M00_NukeStrike_Anim)

JFW_PlayAnimation_DestroyObject (clone of M00_PlayAnimation_DestroyObject_DAY)
	AnimationName (animation to play)

JFW_BuildingStateSoundSpeaker (clone of M00_BuildingStateSoundSpeaker)
	Sound_Normal (normal sound to play)
	Sound_Destroyed (destroyed sdound to play)
	BuildingController_ID (building controler ID)
	Is_3D (is the sound 3D)
	Offset (offset to play the sound at)
	Offset_Randomness (random factor for the offset)
	Frequency_Min (minumum time between the sound playing)
	Frequency_Max (maximum time between the sound playing)
	Is_3D_Destroyed (is the destroyed sound 3D)
	Offset_Destroyed (offset to play the destroyed sound at)
	Offset_Randomness_Destroyed (random factor for the destroyed offset)
	Frequency_Min_Destroyed (minumum time between the destroyed sound playing)
	Frequency_Max_Destroyed (maximum time between the destroyed sound playing)
	Explosion_Name (explosion to use)

JFW_BuildingStateSoundControler (clone of M00_BuildingStateSoundControler)
	BuildingSpeaker_ID (ID of the building speaker)

JFW_Play_Sound_Object_Bone (clone of M00_Play_Sound_Object_Bone_DAY)
	Sound_Preset (sound)
	Frequency_Min (minumum time between the sound playing)
	Frequency_Max (maximum time between the sound playing)

JFW_Cinematic_Primary_Killed (clone of Test_Cinematic_Primary_Killed)
	CallbackID (ID to send back to when killed)

JFW_Spawn_Timer (starts a timer when sent a custom, spawns an object when the timer expires)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	SpawnCustom (Custom to watch for)
	TriggerCustom (Custom to send when spawning)
	TriggerID (ID to send spawn custom to)
	SpawnPreset (preset to spawn)
	SpawnLocation (location to spawn)

JFW_Death_Destroy_Object_Delay (like JFW_Death_Destroy_Object but with a delay)
	ID (object to destroy)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)

JFW_Conyard (script for a construction yard)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	DisableCustom (custom to send to disable the construction yard, e.g. on low power)
	Health (how much health to repair every tick)
Stick this on the construction yard building controler, fill in the parameters and the script does the rest.
No need to put anything on the other buildings or to input their IDs anywhere.

JFW_Character_Buy (this will buy a new character for the player entering the zone)
	Preset_Name (character preset to buy)
	Cost (cost of the preset)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Zone_Character (this will change the character of the player entering the zone to a new one)
	Preset_Name (character preset to change to)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Teleport_Zone_Team (like TDA_Teleport_Zone but team specific)
	Location (Vector location of where to be sent)
	Object_ID (Object to teleport to)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Create_Destroy_Object_On_Enter (will create an object on zone entry and destroy it on zone exit)
	Location (lcoation to create the object)
	Facing (direction it should face)
	Preset (preset to create)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Custom_Send_Ordered_Customs (will send 8 customs in order when it recieves a custom, i.e. first time it recieves custom, custom1 is sent)
	ID1 (first ID to send to)
	ID2 (second ID to send to)
	ID3 (third ID to send to)
	ID4 (forth ID to send to)
	ID5 (fifth ID to send to)
	ID6 (sixth ID to send to)
	ID7 (seventh ID to send to)
	ID8 (eighth ID to send to)
	Custom1 (first custom to send)
	Custom2 (second custom to send)
	Custom3 (third custom to send)
	Custom4 (forth custom to send)
	Custom5 (fifth custom to send)
	Custom6 (sixth custom to send)
	Custom7 (seventh custom to send)
	Custom8 (eighth custom to send)
	WaitCustom (custom to listen for)

JFW_Custom_Send_Customs (will send multiple customs when it recieves a custom)
	ID1 (first ID to send to)
	ID2 (second ID to send to)
	ID3 (third ID to send to)
	ID4 (forth ID to send to)
	ID5 (fifth ID to send to)
	ID6 (sixth ID to send to)
	ID7 (seventh ID to send to)
	ID8 (eighth ID to send to)
	Custom1 (first custom to send)
	Custom2 (second custom to send)
	Custom3 (third custom to send)
	Custom4 (forth custom to send)
	Custom5 (fifth custom to send)
	Custom6 (sixth custom to send)
	Custom7 (seventh custom to send)
	Custom8 (eighth custom to send)
	WaitCustom (custom to listen for)

JFW_Custom_Send_Custom_Multiple_IDs (will send a custom to multiple objects when it recieves a custom)
	ID1 (first ID to send to)
	ID2 (second ID to send to)
	ID3 (third ID to send to)
	ID4 (forth ID to send to)
	ID5 (fifth ID to send to)
	ID6 (sixth ID to send to)
	ID7 (seventh ID to send to)
	ID8 (eighth ID to send to)
	WaitCustom (custom to wait for)
	SendCustom (custom to send)
	
JFW_Set_Health_On_Custom
JFW_Add_Health_On_Custom
JFW_Set_Max_Health_On_Custom
JFW_Add_Max_Health_On_Custom
JFW_Set_Shield_Strength_On_Custom
JFW_Add_Shield_Strength_On_Custom
JFW_Set_Max_Shield_Strength_On_Custom
JFW_Add_Max_Shield_Strength_On_Custom
	Custom (custom to listen for)
	Value (how much to add)
All of these scripts, when they recieve a custom will affect the health/max health/shield strength/max shield strength of the object with the script attatched.

JFW_Set_Health_On_Custom_Sender
JFW_Add_Health_On_Custom_Sender
JFW_Set_Max_Health_On_Custom_Sender
JFW_Add_Max_Health_On_Custom_Sender
JFW_Set_Shield_Strength_On_Custom_Sender
JFW_Add_Shield_Strength_On_Custom_Sender
JFW_Set_Max_Shield_Strength_On_Custom_Sender
JFW_Add_Max_Shield_Strength_On_Custom_Sender
	Custom (custom to listen for)
	Value (how much to add)
All of these scripts, when they recieve a custom will affect the health/max health/shield strength/max shield strength of the sender of the message.
Use these for powerups.

JFW_Create_Destroy_Object_On_Custom_Death (creates an object on a custom then destroys it on another custom)
	Location (location to spawn)
	Facing (what direction to face)
	Preset (preset to create)
	CreateMessage (message for creation)
	DestroyMessage (message for destruction)
When the object with this script attatched to it dies, the created object is destroyed)

JFW_Create_Destroy_Object_On_Custom_Death_Bone (creates an object on a custom then destroys it on another custom)
	Location (location to spawn)
	Facing (what direction to face)
	Preset (preset to create)
	CreateMessage (message for creation)
	DestroyMessage (message for destruction)
	BoneName (bone to spawn at)
When the object with this script attatched to it dies, the created object is destroyed)

JFW_Custom_Destroy_All_Buildings (destroys all buildings of a specified team on custom, this will end the game)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI)

JFW_Random_Timer_Play_Cinematic (plays a cinematic on a random timer)
	TimeMin (minumum amount of how long the timer should run for)
	TimeMax (maximum amount of how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (repeat multiple times)
	Script_Name (script name to play)
	Location (location to play at)
	Facing (direction to face)

JFW_Flying_Infantry (calls Toggle_Fly_Mode on the thing the script is attatched to on startup)

JFW_Flying_Infantry_Custom (calls Toggle_Fly_Mode the thing the script is attatched to on custom)
	Message (message to listen for)

JFW_Flying_Infantry_Powerup (powerup that calls Toggle_Fly_Mode on the collector)

JFW_Flying_Infantry_Enter (calls Toggle_Fly_Mode on the thing that entered the zone)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Flying_Infantry_Exit (calls Toggle_Fly_Mode on the thing that exited the zone)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
Toggle_Fly_Mode will make the infantry that its called on fly if they are not flying and not fly if they are.
Controls for flying infantry are the same as for helicoptors (C and space being defaults)

JFW_Warp_On_Pickup_Team (like KAK_Warp_On_Pickup but team specific)
	Position (Location to warp player)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Base_Defence_No_VTOL
JFW_Base_Defence_VTOL_Only
JFW_Base_Defence_No_VTOL_Secondary
JFW_Base_Defence_VTOL_Only_Secondary
JFW_Base_Defence_Animated_No_VTOL
JFW_Base_Defence_Animated_VTOL_Only
JFW_Base_Defence_Animated_No_VTOL_Secondary
JFW_Base_Defence_Animated_VTOL_Only_Secondary
JFW_Building_Gun_No_VTOL
JFW_Building_Gun_Weapon_No_VTOL
JFW_Repair_Zone_No_VTOL
JFW_Building_Gun_No_VTOL_Secondary
JFW_Building_Gun_Weapon_No_VTOL_Secondary
JFW_Building_Gun_Animated_No_VTOL
JFW_Building_Gun_Animated_Weapon_No_VTOL
JFW_Building_Gun_Animated_No_VTOL_Secondary
JFW_Building_Gun_Animated_Weapon_No_VTOL_Secondary
JFW_Building_Gun_VTOL_Only
JFW_Building_Gun_Weapon_VTOL_Only
JFW_Repair_Zone_VTOL_Only
JFW_Building_Gun_VTOL_Only_Secondary
JFW_Building_Gun_Weapon_VTOL_Only_Secondary
JFW_Building_Gun_Animated_VTOL_Only
JFW_Building_Gun_Animated_Weapon_VTOL_Only
JFW_Building_Gun_Animated_VTOL_Only_Secondary
JFW_Building_Gun_Animated_Weapon_VTOL_Only_Secondary
These are exactly like the _Aircraft_Only and _No_Aircraft except instead of checking preset names, they specifically check the physics type of the object for VTOLPhysics

JFW_Refill_Buy (buys refill for the object that entered the zone)
	Cost (cost for the refill)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
Note that the money will still be deducted even if they dont need refill.

JFW_Refill_Powerup (gives refill for the collector of the powerup)
This one would be great for Deathmatch maps where there are no PTs.

JFW_Zone_Refill (gives refill for the object that entered the zone)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
by "refill", I refer to the same thing as what happens when you press the "refill" button on the PCT.

JFW_Vehicle_Buy (buys a vechicle for a given player, it will be created at the weapons factory/airstrip)
	Preset_Name (vehicle preset to buy)
	Cost (cost)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, also specifies wich factory will be used)

JFW_Create_Vehicle_On_Custom (creates a vechicle at the WF/AS when sent a custom)
	Preset_Name (vehicle preset to create)
	Delay (some sort of delay value for creating the custom)
	Player_Type (which teams factory to use, 0 = Nod, 1 = GDI)

JFW_Zone_Vehicle (creates a vechicle for the thing that entered the zone, will use the WF/AS to create it)
	Preset_Name (vechicle preset to buy)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, also specifies wich factory will be used)
Note that if you spawn a Nod vechicle at the GDI factory, it will still be owned by Nod (and vice versa)

JFW_Powerup_Buy (buys a powerup for a given player)
	Preset_Name (powerup preset to buy)
	Cost (cost)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Timer_Custom_On_Off (starts a timer when sent a custom, sends a custom when the timer expires, stops the system when sent another custom)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (repeat the timer)
	ID (ID to send to)
	Message (message to send)
	Param (parameter to send)
	EnableMessage (message to enable the timer)
	DisableMessage (message to disable the timer)

JFW_Zone_Weapon (will give a weapon to the thing that enters the zone)
	Weapon_Name (weapon to give)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Zone_Powerup (grants a powerup for the thing that entered the zone)
	Preset_Name (powerup preset to grant)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Timer_Play_Random_Cinematic (like JFW_Timer_Play_Cinematic but chooses between one of 5 cinematics at random)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (repeat the cinematic)
	Script_Name1 (first cinematic)
	Script_Name2 (second cinematic)
	Script_Name3 (third cinematic)
	Script_Name4 (forth cinematic)
	Script_Name5 (fifth cinematic)
	Location (location to play)
	Facing (direction to face)

JFW_Random_Timer_Play_Random_Cinematic (like JFW_Random_Timer_Play_Cinematic but chooses between one of 5 cinematics at random)
	TimeMin (minumum amount of how long the timer should run for)
	TimeMax (maximum amount of how long the timer should run for)
	TimerNum (what number to use for the timer)
	Repeat (repeat the cinematic)
	Script_Name1 (first cinematic)
	Script_Name2 (second cinematic)
	Script_Name3 (third cinematic)
	Script_Name4 (forth cinematic)
	Script_Name5 (fifth cinematic)
	Location (location to play)
	Facing (direction to face)

JFW_Vehicle_Powerup (when this powerup is collected, a custom is sent to the vehicle the collector is driving)
	Message (message to send)

JFW_Vehicle_Powerup_Preset (when this powerup is collected, a custom is sent to the vehicle the collector is driving but only if it is a certain preset)
	Message (message to send)
	Preset (preset to check for)
These 2 can be used (in conjunction with various scripts on vechicles to respond to the custom) to do Vehicle Upgrades like in Generals.

JFW_Powerup_Send_Custom (Sends a custom when this powerup is collected)
	ID (id to send to)
	Message (message to send)

JFW_Powerup_Send_Custom_Team (sends a custom when this powerup is collected based on the team of the collector)
	GDIID (GDI id to send to)
	GDIMessage (GDI message to send)
	NodID (Nod ID to send to)
	NodMessage (Nod message to send)

JFW_Zone_Send_Custom_Team (sends a custom on zone entry/exit based on the team of the thing that entered/exited the zone)
	GDIID (GDI id to send to)
	GDIEnterMessage (GDI enter message to send)
	GDIEnterParam (GDI enter parameter to send)
	GDIExitMessage (GDI exit message to send)
	GDIExitParam (GDI exit parameter to send)
	NodID (Nod id to send to)
	NodEnterMessage (Nod enter message to send)
	NodEnterParam (Nod enter parameter to send)
	NodExitMessage (Nod exit message to send)
	NodExitParam (Nod exit parameter to send)

JFW_Regenerate_Health_Conditional (starts regenrating health on custom, stops on another custom)
	EnableMessage (enable message)
	DisableMessage (disable message)
	Amount (amount to heal per second)

JFW_Drone_Damage (will start damaging an object when that object is attacked by a particular preset)
	RepairStop (stop the drone damage on repair, 1 = yes, 0 = no)
	Preset (drone preset)
	Amount (amount to damage per second)
	Custom (this message will be sent back to the drone unit when the damage starts, use it to e.g. kill the drone unit)
This one could work for e.g. the RA2 Terror Drone
It will ensure that if the thing doing the damage is an infantry unit inside a vechicle, the vechicle is tested against, not the infantry

JFW_Vechicle_Animation_2 (like JFW_Vechicle_Animaton but with "up" and "down" animations)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
	Time (how long the timer should run for, 0.1 is a good value)
	TimerNum (what number to use for the timer)
	UpAnimation (animation to play when movement starts)
	UpSubobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	UpFirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	UpLastFrame (frame to go to, -1 means "end of animation")
	UpBlended (frame to start animating at, 0 means first frame, -1 means "current frame")
	DownAnimation (animation to play after movement stops)
	DownSubobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	DownFirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	DownLastFrame (frame to go to, -1 means "end of animation")
	DownBlended (some value for blended animation, only applies to Solders)

JFW_Zone_Animation (plays an animation on zone entry then one on repeat then one on zone exit)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
	UpAnimation (animation to play when zone enter is triggered)
	UpSubobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	UpFirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	UpLastFrame (frame to go to, -1 means "end of animation")
	UpBlended (frame to start animating at, 0 means first frame, -1 means "current frame")
	DownAnimation (animation to play when zone exit is triggered)
	DownSubobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	DownFirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	DownLastFrame (frame to go to, -1 means "end of animation")
	DownBlended (some value for blended animation, only applies to Solders)

JFW_Group_Purchase_Zone (allows multiple people to contribute to a purchase)
	CashPerPerson (how much cash to take per person)
	TotalCash (total cash to take)
	ID (ID to send to)
	Custom (custom to send once enough cash has been collected)
if the same person enters the zone twice with enough cash, it will let them contribute twice

JFW_Zone_Timer (starts a timer when the right team enters the zone, if enough players of that team are in the zone on timer expired, sends a custom)
	Count (how many people need to be there)
	ID (ID to send to)
	Custom (custom to send)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)

JFW_Building_Damage (this will damage all buildings in a certain radius)
	Message (what message to listen for to do the damage)
	Player_Type (which teams buildings to damage, 0 = Nod, 1 = GDI, 2 = any)
	Damage (how much damage to do)
	Warhead (warhead to use)
	Distance (max distance to damage)

JFW_Building_Damage_Scale (this will damage all buildings in a certain radius, it uses a scaling factor to scale the damage based on how far away the building is)
	Message (what message to listen for to do the damage)
	Player_Type (which teams buildings to damage, 0 = Nod, 1 = GDI, 2 = any)
	Damage (how much damage to do)
	Warhead (warhead to use)
	Distance (max distance to damage)

JFW_Building_Damage_Percentage (this will damage all buildings in a certain radius, it does various percentage of damaged based on the buildings max health)
	Message (what message to listen for to do the damage)
	Player_Type (which teams buildings to damage, 0 = Nod, 1 = GDI, 2 = any)
	Percengage (what percentage of the buildings health to take off)
	Warhead (warhead to use)
	Distance (max distance to damage)
These 3 are intended to overcome the "explosions dont damage buildings" problem
The location used in the test is the location of the building controler.
The location used for the centerpoint is the location of the sender of the message.
Note that the parameter of the custom is what gets passed as the "damager" of the buildings.
This means that that object (which may be a player if JFW_Death_Send_Custom_ID is used) will recieve the points for the damage.

JFW_Weapon_Change_On_Custom (changes the weapon given to an object)
	Message (message to listen for)
	Powerup (powerup to grant for the weapon)
	Weapon (weapon to select)
What this script does is removes all current weapons held by whatever its attached to.
It then gives a new powerup followed by a new weapon. This will work for vechicles as well as infantry.
This will remove all weapons (including pistol/C4)
The powerup and weapon need to match

JFW_Weapon_Change_On_Custom_Sender (changes the weapon given to an object)
	Message (message to listen for)
	Powerup
	Weapon
What this script does is removes all current weapons held by the sender of the custom.
It then gives a new powerup followed by a new weapon. This will work for vechicles as well as infantry.
This will remove all weapons (including pistol/C4)
The powerup and weapon need to match
This script can be used on a powerup

JFW_Weapon_Change_On_Custom_Multiple (changes the weapon given to an object, this one gives multiple powerups)
	Message (message to listen for)
	Powerup1 (powerup to grant)
	Powerup2 (powerup to grant)
	Powerup3 (powerup to grant)
	Powerup4 (powerup to grant)
	Powerup5 (powerup to grant)
	Weapon (weapon to select)
What this script does is removes all current weapons held by whatever its attached to.
It then gives new powerups followed by a new weapon.
This will remove all weapons (including pistol/C4)
The weapon needs to match one of the powerups.
Pass 0 for any powerups you dont want to use.

JFW_Weapon_Change_On_Custom_Multiple_Sender (changes the weapon given to an object, this one gives multiple powerups)
	Message (message to listen for)
	Powerup1 (powerup to grant)
	Powerup2 (powerup to grant)
	Powerup3 (powerup to grant)
	Powerup4 (powerup to grant)
	Powerup5 (powerup to grant)
	Weapon (weapon to select)
What this script does is removes all current weapons held by the sender of the custom.
It then gives new powerups followed by a new weapon.
This will remove all weapons (including pistol/C4)
The weapon needs to match one of the powerups.
Pass 0 for any powerups you dont want to use.
This script can be used on a powerup

JFW_Clear_Weapons_On_Custom (removes all weapons from the object this script is attatched to)
	Message (message to listen for)
This script can be used on a powerup

JFW_Set_Model_On_Custom_Sender (when this script recieves a custom, it changes the model of the thing that sent the custom)
	Message (message to listen for)
	Model (model to change to)
This script can be used on a powerup

JFW_Send_Driver_Custom_On_Enter (this sends a custom to the driver of a vechicle when they enter and exit it)
	EnterMessage (message to send on vechicle enter)
	ExitMessage (message to send on vechicle exit)
If you want to implement something like the IFV in RA2, you can put JFW_Send_Driver_Custom_On_Enter on the vechicle.
Then you can put JFW_Set_Model_On_Custom_Sender and JFW_Weapon_Change_On_Custom_Sender on all infantry units to change 
the appearence and weapon of the vechicle.

these scripts:
JFW_Base_Defence_Animated_Sound
JFW_Base_Defence_Animated_Sound_No_Aircraft
JFW_Base_Defence_Animated_Sound_Aircraft_Only
JFW_Base_Defence_Animated_Sound_Secondary
JFW_Base_Defence_Animated_Sound_No_Aircraft_Secondary
JFW_Base_Defence_Animated_Sound_Aircraft_Only_Secondary>
JFW_Base_Defence_Animated_Sound_No_VTOL
JFW_Base_Defence_Animated_Sound_VTOL_Only
JFW_Base_Defence_Animated_Sound_No_VTOL_Secondary
JFW_Base_Defence_Animated_Sound_VTOL_Only_Secondary
are the same as the non sound ones except they take a 3d sound name to play at the location of the effect preset when it "animates up" (e.g. a motor sound for a samsite)
Sound (sound to play when they pop up)

these scripts:
JFW_Building_Gun_Animated_Sound_No_VTOL
JFW_Building_Gun_Animated_Sound_Weapon_No_VTOL
JFW_Building_Gun_Animated_Sound_No_VTOL_Secondary
JFW_Building_Gun_Animated_Sound_Weapon_No_VTOL_Secondary
JFW_Building_Gun_Animated_Sound_VTOL_Only
JFW_Building_Gun_Animated_Sound_Weapon_VTOL_Only
JFW_Building_Gun_Animated_Sound_VTOL_Only_Secondary
JFW_Building_Gun_Animated_Sound_Weapon_VTOL_Only_Secondary
JFW_Building_Gun_Animated_Sound
JFW_Building_Gun_Animated_Sound_Weapon
JFW_Building_Gun_Animated_Sound_No_Aircraft
JFW_Building_Gun_Animated_Sound_Aircraft_Only
JFW_Building_Gun_Animated_Sound_Weapon_No_Aircraft
JFW_Building_Gun_Animated_Sound_Weapon_Aircraft_Only
JFW_Building_Gun_Animated_Sound_Secondary
JFW_Building_Gun_Animated_Sound_Weapon_Secondary
JFW_Building_Gun_Animated_Sound_No_Aircraft_Secondary
JFW_Building_Gun_Animated_Sound_Aircraft_Only_Secondary
JFW_Building_Gun_Animated_Sound_Weapon_No_Aircraft_Secondary
JFW_Building_Gun_Animated_Sound_Weapon_Aircraft_Only_Secondary
are the same as the non sound ones except they take a 3d sound name to play at the location of the effect preset when it "charges up"
Sound (sound to play)

JFW_Death_Send_Custom_ID (when this object dies, it sends a custom with the ID of the object as the parameter)
	ID (what ID to send to)
	Message (what message to send)

JFW_Death_Send_Custom_Driver_ID (when this object dies, it sends a custom with the ID of the driver of the object as the parameter)
	ID (what ID to send to)
	Message (what message to send)

JFW_Blow_Up_On_Death_Driver (this script creates an explosion when whatever its attatched to dies, usefull for e.g. a Demo Truck, this one gives points from the explosion to the driver of the vechicle)
	Explosion (which explosion to create)

JFW_Random_DriverDeath (like RA_DriverDeath but randomly triggered)
	Percentage (what percentage change for death to happen)

JFW_Cinematic_Attack_Position (when this script is created, it will attack a specifc position, use in cinematics for example)
	Priority (priority for the action)
	Postion (the location to attack)
	Range (maximum effective range of the attack)
	Deviation (deviation of the attack)
	Primary (1 = use primary weapon,2 = dont use primary weapon)

JFW_Repair_On_Custom (when sent a custom, it repairs a certain amount of health/shield strength)
	Message (message to listen for)
	Health (health/shield strength to repair)

JFW_Conyard_Vehicle_Buildings (like JFW_Conyard but sends a custom to all vechicles with DecorationPhys pysics type (i.e. all nonmovable vechicles) so that they can repair also)
	Time (how long the timer should run for)
	TimerNum (what number to use for the timer)
	DisableCustom (custom to send to disable the construction yard, e.g. on low power)
	Health (how much health to repair every tick)
	Message (what message to send)
Stick this on the construction yard building controler, fill in the parameters and the script does the rest.
No need to put anything on the other buildings or to input their IDs anywhere.

JFW_Gate_Zone_2 (this script is usefull for doing a Tiberian Sun style gate)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Time (how long the gate should be open for)
	TimerNum (what number to use for the timer)
	ID (the ID of the gate object)
	Animation (the animation to play)

JFW_Animated_Effect (plays an animated effect then destroys itself)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
	Model (model to set to)
	Message (message to wait for)
	Location (location to spawn at)

JFW_Animated_Effect_2 (plays an animated effect then destroys itself,uses the location of the object with JFW_Animated_Effect_2 on it as the location)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
	Model (model to set to)
	Message (message to wait for)
	
JFW_Random_Animated_Effect (plays an animated effect then destroys itself)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
	Model (model to set to)
	Message (message to wait for)
	Location (location to spawn at)
	Offset (random offset to spawn at)
The object will spawn at a location no greater than ofsset.x from the specified location and no less than -offset.x
Same for y and z.

JFW_Random_Animated_Effect_2 (plays an animated effect then destroys itselfuses the location of the object with JFW_Animated_Effect_2 on it as the location)
	Animation (the animation to use e.g. ref_crusher.ref_crusher)
	Subobject (the subobject to use for this animation, a value of 0 will mean "no subobject")
	FirstFrame (frame to start animating at, 0 means first frame, -1 means "current frame")
	LastFrame (frame to go to, -1 means "end of animation")
	Blended (some value for blended animation, only applies to Solders)
	Model (model to set to)
	Message (message to wait for)
	Offset (random offset to spawn at)
The object will spawn at a location no greater than ofsset.x from the specified location and no less than -offset.x
Same for y and z.

JFW_2D_Sound_Damage (when the building gets damaged below <damage> health, the sound is played and the sound is disabled. If the building goes above <damage> health, it will enable the sound again)
	Sound (sound to play)
	Damage (damage to watch for)

JFW_3D_Sound_Damage (when the building gets damaged below <damage> health, the sound is played and the sound is disabled. If the building goes above <damage> health, it will enable the sound again)
	Sound (sound to play)
	Damage (damage to watch for)
	Offset (offset from the location of the object with JFW_3D_Sound_Damage to play the sound at)

JFW_Character_Buy_Poke (like JFW_Character_Buy but triggers on poke)
	Preset_Name (character preset to buy)
	Cost (cost of the preset)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Refill_Buy_Poke (like JFW_Refill_Buy but triggers on poke)
	Cost (cost for the refill)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
Note that the money will still be deducted even if they dont need refill.

JFW_Vehicle_Buy_Poke (like JFW_Vehicle_Buy but triggers on poke)
	Preset_Name (vehicle preset to buy)
	Cost (cost)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, also specifies wich factory will be used)

JFW_Powerup_Buy_Poke (like JFW_Powerup_Buy but triggers on poke)
	Preset_Name (powerup preset to buy)
	Cost (cost)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = any)

JFW_Weapon_Buy_Poke (like JFW_Weapon_Buy but triggers on poke)
	Weapon_Name (the name of the weapon to grant, any valid powerup name should work)
	Cost (the cost)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc)

JFW_Preset_Buy_Poke (like JFW_Preset_Buy but triggers on poke)
	Preset_Name (the name of the preset to create)
	Cost (the cost)
	Location (the location to spawn it at)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any, 3 = havoc)
All of these should work with a 0 cost.

JFW_PCT (triggers a PCT)
	Player_Type (which team type to trigger on, 0 = Nod, 1 = GDI, 2 = trigger GDI terminal for GDI players, Nod terminal for Nod players)
	
JFW_Group_Purchase_Poke (like JFW_Group_Purchase_Zone but you poke it)
	CashPerPerson (how much cash to take per person)
	TotalCash (total cash to take)
	ID (ID to send to)
	Custom (custom to send once enough cash has been collected)
if the same person enters the zone twice with enough cash, it will let them contribute twice

JFW_Gate_Poke (like JFW_Gate_Zone_2 but you poke it)
	Player_Type (what player type to trigger on, 0 = Nod, 1 = GDI, 2 = any)
	Time (how long the gate should be open for)
	TimerNum (what number to use for the timer)
	ID (the ID of the gate object)
	Animation (the animation to play)

JFW_Set_Background_Music_On_Custom (will set the background music for all players on custom)
	Message (message to listen for)
	Music (music to play)

JFW_Fade_Background_Music_On_Custom (will fade the background music for all players on custom)
	Message (message to listen for)
	Music (music to play)
	unk1 (unknown value passed to Fade_Background_Music)
	unk2 (unknown value passed to Fade_Background_Music)

JFW_Stop_Background_Music_On_Custom (will stop the background music for all players on custom)
	Message (message to listen for)

JFW_Set_Background_Music_On_Enter (will set the background music for the object that entered the zone on enter)
	Music (music to play)

JFW_Fade_Background_Music_On_Enter (will fade the background music for the object that entered the zone on enter)
	Music (music to play)
	unk1 (unknown value passed to Fade_Background_Music)
	unk2 (unknown value passed to Fade_Background_Music)

JFW_Stop_Background_Music_On_Enter (will stop the background music for the object that entered the zone on enter)

JFW_Fog_Create (changes the fog on startup)
	Fog_Enable (enable fog, 1 = enable, 0 = disable)
	Fog_Start_Distance (distance to start drawing the fog at)
	Fog_End_Distance (distance to stop drawing the fog at)
	Delay (delay before drawing it)
	OnCreate (trigger on create)
	OnDestroy (trigger on destroy)

JFW_Fog_Custom (changes the fog on custom)
	Fog_Enable (enable fog, 1 = enable, 0 = disable)
	Fog_Start_Distance (distance to start drawing the fog at)
	Fog_End_Distance (distance to stop drawing the fog at)
	Delay (delay before drawing it)
	Message (mesasge to wait for)

JFW_Fog_Zone (changes the fog on entry)
	Fog_Enable (enable fog, 1 = enable, 0 = disable)
	Fog_Start_Distance (distance to start drawing the fog at)
	Fog_End_Distance (distance to stop drawing the fog at)
	Delay (delay before drawing it)
	OnEnter (trigger on enter)
	OnExit (trigger on exit)

JFW_War_Blitz_Create (changes the war blitz on create)
	War_Blitz_Intensity (how strong to make the war blitz)
	Start_Distance (how close to start the war blitz)
	End_Distance (how far away to end the war blitz)
	War_Blitz_Heading (what direction to make the war blitz)
	War_Blitz_Distribution (how often to draw the war blitz)
	Delay (delay before drawing it)
	OnCreate (trigger on create)
	OnDestroy (trigger on destroy)

JFW_War_Blitz_Custom (changes the war blitz on custom)
	War_Blitz_Intensity (how strong to make the war blitz)
	Start_Distance (how close to start the war blitz)
	End_Distance (how far away to end the war blitz)
	War_Blitz_Heading (what direction to make the war blitz)
	War_Blitz_Distribution (how often to draw the war blitz)
	Delay (delay before drawing it)
	Message (mesasge to wait for)

JFW_War_Blitz_Zone (changes the war blitz on entry)
	War_Blitz_Intensity (how strong to make the war blitz)
	Start_Distance (how close to start the war blitz)
	End_Distance (how far away to end the war blitz)
	War_Blitz_Heading (what direction to make the war blitz)
	War_Blitz_Distribution (how often to draw the war blitz)
	Delay (delay before drawing it)
	OnEnter (trigger on enter)
	OnExit (trigger on exit)

JFW_Lightning_Custom (changes the lightning on custom)
	Lightning_Intensity (how strong to make the lightning)
	Start_Distance (how close to start the lightning)
	End_Distance (how far away to end the lightning)
	Lightning_Heading (what direction to make the lightning)
	Lightning_Distribution (how often to draw the lightning)
	Delay (delay before drawing it)
	Message (mesasge to wait for)

JFW_Wind_Custom (changes the wind on custom)
	Wind_Heading (direction of the wind)
	Wind_Speed (speed of the wind)
	Wind_Variability (how often to blow)
	Delay (delay before drawing it)
	Message (mesasge to wait for)

JFW_Precipitation_Custom (changes the precipitation on custom)
	Type (type, can be "Rain", "Snow" or "Ash")
	Density (how much should be drawn)
	Delay (delay before drawing it)
	Reset_Precipitation (set to 1 to turn off all other forms of precipitation)
	Message (mesasge to wait for)

JFW_Clouds_Custom (changes the clouds on custom)
	Cloud_Cover (how many clouds to draw)
	Cloud_Gloominess (how dark to make them)
	Delay (delay before drawing it)
	Message (mesasge to wait for)
	
JFW_Custom_Grant_Key (will grant a key on custom)
	Message (message to listen for)
	Key (key to grant)
	
JFW_Screen_Fade_On_Custom (will fade the screen on custom)
	Message (message to listen for)
	Red (red value between 0 and 1)
	Green (green value between 0 and 1)
	Blue (blue value between 0 and 1)
	Opacity (opacity value)

JFW_Screen_Fade_On_Enter (will fade the screen on custom)
	Red (red value between 0 and 1)
	Green (green value between 0 and 1)
	Blue (blue value between 0 and 1)
	Opacity (opacity value)

JFW_Screen_Fade_On_Exit (will fade the screen on custom)
	Red (red value between 0 and 1)
	Green (green value between 0 and 1)
	Blue (blue value between 0 and 1)
	Opacity (opacity value)
This is the same logic RenAlert used for the underwater effect.
values of 0 for red, 0 for green and 1 for blue with 150 for opacity look good for underwater
and using 0 for red, 1 for green and 0 for blue would work for e.g. a vat of acid (perhaps in combination with a script to slowly kill you)

JFW_Enable_Stealth_On_Custom (enables stealth of the object with JFW_Enable_Stealth_On_Custom on it)
	Message (message to listen for)
	Enable (enable or disable, 1 = enable, 0 = disable)

JFW_Goto_Object_On_Startup (when this script is created, it will make an object go to another object)
	ID (object to go to)
	Speed (speed to go there)
	ArriveDistance (how close to go)

JFW_Enable_Team_Radar_On_Custom (will enable the radar for a team on custom)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)
	Message (message to wait for)
	Enable (1 = enable, 0 = disable)
Note that if someone joins after Enable_Team_Radar_On_Custom triggers, their radar wont be disabled.
So use some kind of timer to make sure that JFW_Enable_Team_Radar_On_Custom triggers peroidically

JFW_Disable_Radar_Zone (will disable the radar of the object that enters the zone on enter and enable it on exit)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)

JFW_Poke_Send_Custom_2 (sends a custom when poked)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)
	ID (ID to send to)
	Message (message to send)
	Param (parameter to send)

JFW_Poke_Send_Custom_Preset (sends a custom when poked if the player is a certain preset)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)
	ID (ID to send to)
	Message (message to send)
	Param (parameter to send)
	Preset (preset name to check for)

JFW_Poke_Send_Custom_Keycard (sends a custom when poked if the player has a certain key)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)
	ID (ID to send to)
	Message (message to send)
	Param (parameter to send)
	Key (key to check for)

JFW_Poke_Send_Custom_Cost (sends a custom when poked if the player has enough money)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)
	ID (ID to send to)
	Message (message to send)
	Param (parameter to send)
	Cost (cost to send)

JFW_Poke_Play_2D_Sound (plays a 2D sound when poked)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)
	Sound (sound to play)

JFW_Poke_Play_3D_Sound (plays a 3D sound when poked)
	Player_Type (0 = Nod, 1 = GDI, 2 = both)
	Sound (sound to play)
	Position (location to play it at)

JFW_Console_Message_On_Custom (prints a mesasge on the server console on custom)
	Message (message to listen for)
	Output (string to output)
This would be usefull to output special messages to tell server owners whats going on.
(e.g. any special notes that server owners need to know when using your map)

JFW_BHS_DLL (prints a mesasge to tell the server that bhs.dll is required for this map)

Some things such as sounds, some animations, expolsions, stealth and poke dont work properly in Multiplayer.
However, thanks to the great work on bhs.dll, these things will work in multiplayer.
Note that Poke only works for people, vechicles cant poke (for obvious reasons).
Poke refers to the act of walking up to an object and pressing the action key ("e" by default).
You can poke AI controled soldiers and various static objects (the stuff listed under "simple" in leveledit) but not players or vechicles.
Any machine with scripts.dll 1.9 installed must also have bhs.dll installed.
Certain features require that the clients have bhs.dll installed (see bhs.txt for details and information)
Also as far as the game is concerned, frames in an animation start at 0 not 1 like w3dview shows them.

Also, Dante has written some scripts. Read readme2.txt for details of those scripts.
And, see readme3.txt for information on scripts by NameHunter
And, readme4.txt describes some scripts written for the RenAlert modification (but that might be usefull for other things)
And, readme5.txt describes the scripts for the reborn mod, Tech Assault stuff and Survival stuff.
And, readme6.txt describes some scripts written by vloktboky.
And, readme7.txt describes some scripts written by vloktboky and improved slightly/documented by me
And, readme8.txt describes some scripts written by TheKGBSpy for his ra2 mod (but they may be usefull for other mods also)
And, readme9.txt describes some scripts written be E!
And, readme10.txt describes some scripts written by NeoSaber for his Ren maps
And, readme11.txt descripts some scripts written by TimeFX
Also, linux.txt contains info about the LFDS port of the scripts.
And, bhs.txt contains details of the fixes and stuff in bhs.dll

System Messages:
Certain messages are special system messages. Any script taking a message number can take one of these message numbers (as far as I know).
So far, I am aware of the folowing messages: (some of these are educated guesses)
1000000000 this is what I believe is the marker that specifies the first system message (I dont know what it does, just that its the first one)
1000000001 this one is sent when a sound finishes playing (if it was monitored by Monitor_Sound)
1000000002 this one is sent on toggle power
1000000003 this one is sent when the thing gets to the dock
1000000025 this one is sent to an item when its collected
1000000026 all I know is that this one has something to do with damage
1000000027 all I know is that this one has something to do with getting health back
1000000028 this one gets sent to a vechicle when something enters it
1000000029 this one gets sent to a vechicle when something exits it
1000000030 this one gets sent on something to do with arriving at attack location
1000000031 this one gets sent on something to do with audience for a conversation
1000000032 this one gets sent on something to do with say next remark
1000000033 this one also gets sent on something to do with say next remark but a different bit of code
1000000035 this one gets sent when the jump is complete

That should be (I hope) all the system messages
Note that when using 1000000025 the sender is the object that collected the item.
For 1000000028 and 1000000029, the sender is the object that entered/exited the vechicle

As far as I can tell, the sounds passed to these scripts are preset names. Unless specified otherwise, they should be 3D sounds.
Note that a "custom" and a "message" are the same thing, its something that gets sent from one script to another, usually to tell the second script to do something based on what the first script has done

Another note, where I mention "vechicles only" (e.g. for JFW_Repair_Zone or JFW_Vechicle_Damage_Zone), any AI-controled infantry will also count as a "vechicle".
Thats because there is no "is/isnt a vechicle" test, only a "is/isnt a player" test.

One important thing to note is that any script that deals with "poke" or "action key" will not work properly in multiplayer (thats why the CTF script greg wrote doesnt work properly although his new one should work properly)

Another note about script zones. If you enter a script zone inside a vechicle and the zone has "check stars only" = on, only the player will trigger the zone, not the vechicle.
If "check stars only" = off, it will trigger on the vechicle and on the player. (the vechicle is triggered first on zone entry, the player is triggered first on zone exit)

Another warning: Never leave a script parameter blank. If its a string parameter, set it to some dummy value. If its a numeric parameter, set it to 0 or something.

Some notes for those coding new scripts:
Please only code scripts to work with the latest dll. The older versions may contain bugs that are fixed in the latest dll.
Also, NEVER store a GameObject as a class member variable. Instead, store the ID of that object and use Commands->Get_ID and Commands->Find_Object to convert between ID and object.
In fact, NEVER store a pointer to anything as a class member variable.
Referencing the contents of a GameObject is not recommented unless you know what you are doing.
If you pass the wrong thing to one of the Get_Parameter functions, things may freeze or crash
Also, dont use the Static keyword for anything.
If anyone wants help with scripts coding or related items, let me know.

Also, in order to meet the licence obligations for the scripts.dll, I ask that you:
1.Link back to http://www.sourceforge.net/projects/rentools/ and Credit me for creating the scripts.dll
2.if the DLL is modified with your own scripts, include the complete source code to the dll either directly in the mod zip or as a seperate zip next to the mod zip on the download page). This applies even for beta-testers (give the source to any beta testers)
and 3.if the DLL is unmodified, linking back to http://www.sourceforge.net/projects/rentools/ should be sufficiant to satify the "distribute source" requirements.
See the file COPYING for the actual text of the GNU General Public Licence which the scripts.dll is licenced under.
I am granting a special exemption to the GNU GPL that allows you to link the scripts.dll code and derivitaves of same with any code written by Westwood Studios (including the game client, level editor and the FDS) without the provisions of the GPL applying to
the Westwood code as long as all code not written by Westwood Studios is made Open Source as required by the GPL (3rd party libraries used by Westwood Studios such as the GameSpy library, the Miles Sound System etc are counted as "Code Written By Westwood Studios" for the purposes of this discussion)
This exemption automaticly applies to all code made available under the GPL and that links to the scripts.dll.
The exemption also covers bhs.dll from me (which needs to be closed source because giving the code to it out would aid cheaters and hackers)

Also, a note to me that you have made new scripts, while not essential, would be nice :)

USE THE SCRIPTS.DLL AT YOUR OWN DISCRETION, THIS IS NOT SUPPORTED BY WESTWOOD STUDIOS NOR IS IT RELATED IN ANY WAY.
